Appium 1.9.1 upgrade issues

How can I check the element ID is present on screen or not in Appium 1.9.1 for iOS?

Use:

try{
    driver.findElement(By.id("yourID"));
    //yes, it is present
}catch(Exception e){
   //it is not present.
}

Hey, there is bug in above suggested codes.

Sometimes when the element is present into scroll bar but not on the screen, still it returns true. It means element is present on the screen and I failed to click on that element. Because it is outside the visible area.

Sorry, I missed one thing. Just add “.isDisplayed()” at the end, like this:

try{
driver.findElement(By.id("yourID")).isDisplayed();
    //yes, it is present
}catch(Exception e){
    //it is not present.
}

Hey, Already i tried this and getting same behaviour.

I would need to see a screenshot of Appium desktop. Can you tell me what are it’s coordinates at that state?