App Automation unable to find element even though Appium inspector finds it while inspecting it manually

41 Views Asked by At

Through Appium Inspector i am able to locate element but while running script i am getting below error: FAILED: org.TsApp.B004_passenger_search.PassengerSearchName org.openqa.selenium.NoSuchElementException: An element could not be located on the page using the given search parameters. For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception Build info: version: '4.16.1', revision: '9b4c83354e' System info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.14.0-1059-oem', java.version: '17.0.9' Driver info: io.appium.java_client.android.AndroidDriver Command: [c0263d75-e56d-4648-8578-4ef969c810dc, findElement {using=xpath, value=//android.widget.TextView[@text='PNR Search']}]

screenshot for appium inspector

I tried with id and Xpath but giving same error. X-path : driver.findElement(By.xpath("//android.widget.TextView[@text='PNR Search']")).click();

0

There are 0 best solutions below