# Element could not be located on the page using given search parameters

**URL:** <https://discuss.appium.io/t/element-could-not-be-located-on-the-page-using-given-search-parameters/24945>\
**Category:** Issues/Bugs\
**Created:** [January 22, 2019, 10:50am UTC](https://discuss.appium.io/t/element-could-not-be-located-on-the-page-using-given-search-parameters/24945 "2019-01-22T10:50:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![saffin](https://discuss.appium.io/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@saffin](https://discuss.appium.io/u/saffin)\
**Post date:** [January 22, 2019, 10:50am UTC](https://discuss.appium.io/t/element-could-not-be-located-on-the-page-using-given-search-parameters/24945/1 "2019-01-22T10:50:29Z")

</div>

hello

i am trying to click a button which comes on a new page but its unclickable  
i tried id,classpath , xpaths everything but all time it says element could not be located  
my question is does the app also shows new window like new windows comes in web page while using selenium and we need to switch to that window or frame in order to click the button on that?

well below are appium logs for same

[BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator  
[BaseDriver] Waiting up to 0 ms for condition  
[AndroidBootstrap] Sending command to android: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“id”,“selector”:“com.ecw.healow.ent:id/txtIAgreeToTerms”,“context”:"",“multiple”:false}}  
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“id”,“selector”:“com.ecw.healow.ent:id/txtIAgreeToTerms”,“context”:"",“multiple”:false}}  
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION  
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: find  
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding ‘com.ecw.healow.ent:id/txtIAgreeToTerms’ using ‘ID’ with the contextId: ‘’ multiple: false  
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[INSTANCE=0, RESOURCE\_ID=com.ecw.healow.ent:id/txtIAgreeToTerms]  
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Failed to locate element. Clearing Accessibility cache and retrying.  
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding ‘com.ecw.healow.ent:id/txtIAgreeToTerms’ using ‘ID’ with the contextId: ‘’ multiple: false  
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[INSTANCE=0, RESOURCE\_ID=com.ecw.healow.ent:id/txtIAgreeToTerms]  
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {“status”:7,“value”:“No element found”}  
[AndroidBootstrap] Received command result from bootstrap  
[MJSONWP] Matched JSONWP error code 7 to NoSuchElementError  
[W3C (dfa88783)] Encountered internal error running command: NoSuchElementError: An element could not be located on the page using the given search parameters.  
[W3C (dfa88783)] at AndroidDriver.helpers.findElOrEls (C:\Program Files (x86)\Appium\resources\app\node\_modules\appium-android-driver\lib\commands\find.js:75:11)  
[W3C (dfa88783)] at process.\_tickCallback (internal/process/next\_tick.js:68:7)  
[HTTP] \<-- POST /wd/hub/session/dfa88783-682c-4c6c-8a39-ddd62dd61ceb/element 404 3067 ms - 468  
[HTTP]

also below is the error i am getting in eclipse console

[RemoteTestNG] detected TestNG version 6.14.2  
Jan 22, 2019 5:46:57 AM io.appium.java\_client.remote.AppiumCommandExecutor$1 lambda$0  
INFO: Detected dialect: W3C  
FAILED: login  
org.openqa.selenium.NoSuchElementException: An element could not be located on the page using the given search parameters.  
For documentation on this error, please visit: [http://seleniumhq.org/exceptions/no\_such\_element.html](http://seleniumhq.org/exceptions/no_such_element.html)  
Build info: version: ‘3.14.0’, revision: ‘aacccce0’, time: ‘2018-08-02T20:05:20.749Z’  
System info: host: ‘ATLANTISPC-143’, ip: ‘10.210.16.167’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0\_191’  
Driver info: io.appium.java\_client.android.AndroidDriver  
Capabilities {app: I:\eclipse mars\eclipse\D\w…, appAct

---

<div class="post-metadata">

**Author:** ![saffin](https://discuss.appium.io/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@saffin](https://discuss.appium.io/u/saffin)\
**Post date:** [January 22, 2019, 2:50pm UTC](https://discuss.appium.io/t/element-could-not-be-located-on-the-page-using-given-search-parameters/24945/2 "2019-01-22T14:50:06Z")

</div>

someone please reply and give a solution
