Appium 1.4 waitforElementPresent() command does not work

Hi,

I have just switched too Appium 1.4 version and when I try to execute waitforElementPresent() command it does not work and stops the execution.This function works properly when Element is present but does not work if element is not present.

Any solution for the same.

Thanks
Anshu Khandelwal

Did you try to encapsulate it in a try catch block?

@Benoit : Sorry for late response , I tried that as well but it;s not working.When I degrade my Appium version to 1.2 things are worked for me…But with 1.4 it’s not.

Hi there,

You probably better do something like that:

WebDriverWait wait = new WebDriverWait(driver, 10);
try{
     // Waiting to dismiss view
     wait.until(ExpectedConditions.visibilityOf(myWebElement));
} catch (Exception e){
    // Something wrong happened
}
1 Like