0
votes

I was trying to find the xpath for the following code using uiautomatorviewer for the native android application with appium 1.3.4.1 + selenium 2.44 versions

Here is the screenshot,

enter image description here

I tried the following xpath to find the element "Please enter Roll No..Editing."

driver.switchTo().frame(1);
driver.findElementByXPath("//android.widget.RelativeLayout[0]/android.widget.RelativeLayout[@text='Please enter Roll No.. Editing.']").sendKeys("10001");
driver.findElementByXPath("//android.widget.RelativeLayout[@text='Please enter Roll No.. Editing.']").sendKeys("10001");

I want to identify the text filed by using xpath and send the studentid as 10001

Any suggestions.

1

1 Answers

0
votes

UIAutomatorViewer doesn't give you the XPath. Please use Appium Inspector to find the XPATH.