Please anyone suggest me how to read ui elements of hybrid app

Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 32.78 sec <<< FAILURE! - in TestSuite
test_0001_loginTest on test_0001_loginTest(com.forktech.kyc_test_cases.Select_Test)(com.forktech.kyc_test_cases.Select_Test) Time elapsed: 31.704 sec <<< FAILURE!
org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {“method”:“id”,“selector”:“check_doc_button”}
(Session info: webview=
(Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 10.0 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 131 milliseconds
For documentation on this error, please visit:
Build info: version: ‘2.46.0’, revision: ‘61506a4624b13675f24581e453592342b7485d71’, time: ‘2015-06-04 10:22:50’
System info: host: ‘DESKTOP-I8BK112’, ip: ‘’, ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_121’
Driver info:
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, chrome={}, takesHeapSnapshot=true, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=, platform=ANDROID, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 6d388d91-1104-4acf-9585-925ff7d760d4
*** Element info: {Using=id, value=check_doc_button}
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
at java.lang.reflect.Constructor.newInstance(
at org.openqa.selenium.remote.ErrorHandler.createThrowable(
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(
at org.openqa.selenium.remote.RemoteWebDriver.execute(
at io.appium.java_client.DefaultGenericMobileDriver.execute(
at io.appium.java_client.AppiumDriver.execute(
at org.openqa.selenium.remote.RemoteWebDriver.findElement(
at org.openqa.selenium.remote.RemoteWebDriver.findElementById(
at io.appium.java_client.DefaultGenericMobileDriver.findElementById(
at io.appium.java_client.AppiumDriver.findElementById(
at org.openqa.selenium.By$ById.findElement(
at org.openqa.selenium.remote.RemoteWebDriver.findElement(
at io.appium.java_client.DefaultGenericMobileDriver.findElement(
at io.appium.java_client.AppiumDriver.findElement(
at com.forktech.kyc_test_cases.Select_Test.test_0001_loginTest(

Results :

Failed tests:
Select_Test.test_0001_loginTest:113 » NoSuchElement no such element: Unable to…

Tests run: 2, Failures: 1, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 35.757 s
[INFO] Finished at: 2017-03-17T12:17:48+05:30
[INFO] Final Memory: 12M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project kyc_tesing: There are test failures.
[ERROR] Please refer to C:\Users\Lenovo\workspace\KYC_APPIUM_TESTING\kyc_test_cases\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]

@chaithra :

From reading what you specifically want to mention . To locate the element of Hybrid app you can use:

  1. UILocater, Appium for Android
  2. Appium , Xcode for ios .

Please specify in detail regarding your query

the driver is not taking tags id’s . For almost id’s it’s giving no such element exception

@chaithra :
Make sure you have instance of Android driver instead of remote webdriver
Because i am also doing hybrid app automation for ios 10+ . And I am able to inspect elements well with appium. All elements I am able to inspect with name with ios driver .From your logs it looks like you have switched to webview .

Means in hybrid app,in order to view the web view we have to switch the context to web view right??
I am using Android driver only

In each test case i am switching the context to web view only then also not able to retrieve the ui elements

Yes you have to switch to webview. To confirm whether the web view is correctly can you please print the current URl with some sleep

it’'s in webview only

UI automator is also not taking der id’s

please any one reply

How to get the id of capture button to click on the same of camera in hybrid app’s appium testing

Please anyone reply i am not getting any documentation for this

Hi ,
Please anyone suggest me how to click on OK button of alerts in hybrid app appium testing??