An element could not be located on the page using the given search parameters. (WARNING: The server did not provide any stacktrace information)

hi,
am automating android application with appium version 1.6.6-beta but am getting the below exception

An element could not be located on the page using the given search parameters. (WARNING: The server did not provide any stacktrace information)

	driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);
	driver.findElementByXPath("//android.widget.Button[@text='OK']").clear();
	driver.findElementByXPath("//android.widget.Button[@text='ALLOW']").click();
	driver.findElementByXPath("//android.widget.Button[@text='ALLOW']").click();
	driver.findElementByXPath("//android.widget.Button[@text='ALLOW']").click();
	driver.findElementByXPath("//android.widget.Button[@text='ALLOW']").click();
	driver.findElementByXPath("//android.widget.Button[@text='ALLOW']").click();

driver.findElementById(“com.acelrtech.apps.placeorderandroid:id/login_content_section”).sendKeys(“cs”);

but throwing the exception from last line of code can any one please help me to solve the issue

As I understand, you have a problem with accessing the element “com.acelrtech.apps.placeorderandroid:id/login_content_section”

Before findElementById, can you get the page source with driver.getPageSource and check if the element is visible before you search for it?
Some applications have different approaches on page load commands and can interfere with fetching elements from the DOM

This happens on out projects from time to time and some simple solutions include

  • inserting a wait before findElement
  • putting the app in background for couple of seconds
  • refreshing the screen on the app if possible

hi ,
am getting this exception if i print the PageSource.

Nov 17, 2017 11:17:15 AM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {}->http://127.0.0.1:4723: The target server failed to respond
Nov 17, 2017 11:17:15 AM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {}->http://127.0.0.1:4723

@joee I know this was probably couple of years later…But were you able to fix this? If so how did you?
I couldn’t figure out the issue.

I was trying to automate android app and all I did was setting the capabilities…
caps.setCapability(MobileCapabilityType.AUTOMATION_NAME, ‘uiAutomator2’);

It Worked.