Hi folks,
I am trying to locate a button which is under UIATableCell and I have the following line of code listed below
AppiumWebElement btn1 = (AppiumWebElement)ad.FindElementByXPath("//UIAApplication[1]/UIAWindow[1]/UIAScrollView[1]/UIATableView[1]/UIATableCell[1]/UIAButton[1]");
btn1.Click();
The issue I am facing is , btn1.Click is not clicking on the correct button all the times, At times it seems to click on a button which is not visible on the screen and an alert come up as a result of clicking on that button.
I have verified the xpath using appium inspector and its returns one unique match all the time but when running the script it is not the case.
Also, I am running the test on simulator…any suggestions to troubleshoot will be great.
Thanks,