Hi,
I seem to be facing issues in the fact that WebDriverWait doesn’t seem to be waiting for the specified time. On a PC the wait works fine and correctly throws a NoSuchElement exception, on Android via Appium it gets to the particular line of code and immediately throws ‘org.openqa.selenium.WebDriverException: Returned value cannot be converted to WebElement: {message=no such element: Unable to locate element: {“method”:“id selector”,“selector”:“someID”}’
Here is how I have set things up …
From BaseClass
protected static WebDriver driver;
driver = new AndroidDriver<>(builder, caps);
From Tests
WebDriverWait wait2 = new WebDriverWait(driver, 30);
wait2.until((ExpectedConditions.visibilityOf(homePage.madeUpElement)));
Element in pageObject
@FindBy(id = “someID”)
public WebElement madeUpElement;
Thanks in advance.