Not able to find element as accessibility id is like exactly below:
Ongoing Tab 2 of 3
xpath is like exactly below
//android.view.View[@content-desc="Ongoing Tab 2 of 3"]
how could I mention it in single line?
I need it as "Ongoing Tab 2 of 3" but it contains next line. Is there any way?
I tried as WebElement ongoingTab = driver.findElement(AppiumBy.xpath("//android.view.View[@content-desc="Ongoing" + "\r\n"+ "Tab 2 of 3"]")); and WebElement ongoingTab = driver.findElement(AppiumBy.xpath("//android.view.View[@content-desc="Ongoing\r\n"+ "Tab 2 of 3"]")); but it didn't work.