# Getting "An element could not be located on the page using the given search parameters."

**URL:** <https://discuss.appium.io/t/getting-an-element-could-not-be-located-on-the-page-using-the-given-search-parameters/35764>\
**Category:** Support\
**Created:** [February 27, 2022, 10:59am UTC](https://discuss.appium.io/t/getting-an-element-could-not-be-located-on-the-page-using-the-given-search-parameters/35764 "2022-02-27T10:59:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benjamin\_Kun](https://discuss.appium.io/user_avatar/discuss.appium.io/benjamin_kun/32/9706_2.png) [@Benjamin\_Kun](https://discuss.appium.io/u/Benjamin_Kun)\
**Post date:** [February 27, 2022, 10:59am UTC](https://discuss.appium.io/t/getting-an-element-could-not-be-located-on-the-page-using-the-given-search-parameters/35764/1 "2022-02-27T10:59:44Z")

</div>

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;
