Expectedconditions.visibilityof(Element) and isDisplayed() returning as false in Appium v8

@Aleksei Post logging into the app whenever I’m trying to check for element visibility either via isDisplayed() method or via visibilityOf(element) method in Expected conditions both are returning as false, even thogh the element is well visible in the App source.

  1. I’m using the below method to check for element visibility using Fluentwait & Expected conditions class:
    try{
    FluentWait wait = new FluentWait(driver);
    wait.pollingEvery(Duration.ofMillis(250));
    wait.withTimeout(Duration.ofSeconds(30));
    wait.ignoring(NoSuchElementException.class);
    wait.until(Expectedconditions.visibilityof(element));
    }catch (Exception e){
    returns false
    }
  • This methos id returning as false although the webElement is visible on Appsource.
  1. Also, even if I use element.isDisplayed() method that is also returning as false.

But the element is avaliable on the appSource.

Alternate way I verified: List elem = driver.findElements(AppiumBy.accesibilityId(“xyz”));
elem.size() value is being returned as 1.

Any idea as why isDisplayed() or Expectedconditions.visibilityof(webelement) isn’t working??

Possibly you talking about iOS and it visible attribute, which may be really false while we see it.
Met with such situation… nothing to do - just iOS magic …

Aaahah…I see…thats’s really bad !! :zipper_mouth_face: