New answers tagged


We as a company are providing automation testing services. Our approach is to use Xpath as last priority i.e when no other option is available like ClassName, ID, LinkText, CSS etc. Here we can directly use "LinkText" and above can be make functional like using the below syntax. WebElement link = driver.findElement(By.linkText("Dados Pessoais&...


You can use Appium desktop app or Appium Studio app to inspect your app and generate xpath. But as said above - xpath could change from one build to another, so it's not very good solution. Taking into account that you are accessing button at the bottom, maybe even simple coordinates would be better ?


Get your developers to add element ids, finding elements in this fashion is error prone and breaks your tests whenever the app changes in ways that are hard to diagnose and repair quickly. This kind of test code is a testing anti-pattern. Here is the seminal work on the broader topic (...

Top 50 recent answers are included