Find element by XPath

I try to find specific element by specific XPath which have specific index 3

when i try to make this code
driver.FindElement(By.XPath("//android.widget.EditText[@index='3']")).SendKeys("1234");

I got this exception

{"An element could not be located on the page using the given search parameters."}

How i can fix this ?

could be that xPath changes at run time, you can check that with Appium Inspector.

http://stackoverflow.com/questions/35132830/find-element-in-appium do you own this question as well? Seems like a way is suggested in the solution on SO.

The problem solved by using the following code :
var webs = driver.FindElementsByClassName("android.widget.EditText"); webs[3].SendKeys("1234");

I would like to suggest that you pull the page XML and validate your XPATH construction with this online tool: http://www.freeformatter.com/xpath-tester.html Should help you moving forward to better understand if your XPATH is correct and will function properly.

use “//android.widget.EditText[3]”