this is run on android :
used UiAutomator2
wrote this code:
By by = By.id(“com.wave.ridemicro:id/image”);
AndroidElement el= (AndroidElement) driver.findElement(by);
waitForElementVisibility(el);
got this error
org.openqa.selenium.NoSuchElementException: An element could not be located on the page using the given search parameters.
but if I use page factory its ok
@AndroidFindBy(id = “com.wave.ridemicro:id/image”)
protected AndroidElement image;