Hi . i am new to appium and automating an iOS app.
I am using xpath to locate the elements and IntelliJ as my IDE
Everything works fine untill i loop my script and let it run multiple times.
Loop does work fine but suddenly crashes after some loops.
IntelliJ shows me this error “An element could not be located on the page using the given search parameters. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout”
It crashed nothing @Syed_Umar. The root cause may come from network connection, app loading, etc… Whatever and the actions couldn’t find the elements to interact with.
Did you try to wait the element like:
WebDriverWait wait = new WebDriverWait(webDriver, timeoutInSeconds);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id));
or
wait.until(ExpectedConditions.elementToBeClickable(By.id));