I am using appium to automate the testing of our iOs app. Tests are written in Java.
I am trying to check if an element is present. If yes, I want to click it, if not proceed with the rest of the test without failing my tests.
For example, when I am trying to launch the map, the first time I access the map feature, i get a pop-up if I want to let my app use Location services. This does not come up every time, but only the first time I try to use maps.
So if there is this pop-up, I want to click “ok”, else proceed with the rest of the tests. how do I do this?
If I check using appium.findElement(By.xpath(path)), it times out if the element is not present.