Wait.until(ExpectedConditions.visibilityOfElementLocated(By.name - getting timeout

Hi,

I’m trying to validate existence of some label by using wait.until.

The command is : wait.until(ExpectedConditions.visibilityOfElementLocated(By.name(UIStrings.CONFIRMATION_MESSAGE)));

and then I’m getting an exception of timeout , but if I’m trying to execute next command :

driver.findElement(By.name(UIStrings.CONFIRMATION_MESSAGE)).isEnabled() 

I’m getting ‘true’ …

Any idea why ?

No1 has been using wait.until here :smile:

Hi Igal,
You may be getting timeout exception since element may not be visible in default Appium driver timeout limit of 10 seconds.

Thanks,
Sandeep Panghal

@Sandeep_Panghal , thanks for the answer.

The thing is , why “driver.findElement(By.name(UIStrings.CONFIRMATION_MESSAGE)).isEnabled()” does work ?