XPATH format working for one app and same format fail for another app
my code is like this
driver.findElementByXPath("//*[@class='android.widget.ImageView' and @content-desc='Navigation panel, button, double tap to open side panel']").click();
Can u please share the screenshots of screen along with UI element properties from Appium Inspector.
Inpsect for Hamburger menu
Try thisdriver.findElementByXPath("//*[@class='android.widget.ImageView'][@content-desc='Navigation panel, button, double tap to open side panel']").click();ordriver.findElementByXPath("//*android.widget.ImageView'[@content-desc='Navigation panel, button, double tap to open side panel']").click();
@CrashTestDummy: Thanks for reply. I have tried mentioned options but i have got same error again.
org.openqa.selenium.NoSuchElementException: An element could not be located on the page using the given search parameters. (WARNING: The server did not provide any stacktrace information)
Is it not enough to look only at content-des or id? may try something likedriver.findElement(By.name("Navigation panel, button, double tap to open side panel"));
For Appium name it content-des. Or
driver.findElement(By.id("resource-id value"));
Hello, you can make the dynamic xpath with class name and id .it will work ,if you face any issue please let me know
@CrashTestDummy :- Following works for me driver.findElement(By.id("resource-id value"));
@Amit_Tallewar :- I have tried xpath with class name and id but its not working.
Please tell me how to login in webview . I am stuck in it.