Hi Jayesh, I am getting the same error as Sign Out,it doesnt identify element. Is there any difference in coding compared to hybrid vs native app. This is a native app
I put thread.sleep for 10 seconds and got error again
Exception in thread “main” org.openqa.selenium.InvalidSelectorException: invalid selector: Unable to locate an element with the xpath expression //android.widget.Button[@content-desc=‘Sign Out’] because of the following error:
SyntaxError: Failed to execute ‘evaluate’ on ‘Document’: The string ‘//android.widget.Button[@content-desc=‘Sign Out’]’ is not a valid XPath expression.
Try this
driver.findElementByAndroidUIAutomator("UiSelector().description(\"Sign Out\")")
In xpath, use index and content desc. sometimes 1 field may not identify.