Appium : Element not identified during test run












1















I have obtained locators using appium inspector . The obtained element works well during recording in appium inspector. But when I run the test case, appium fails to identify the element.
Below is the log in the server



    [JSONWP Proxy] Proxying [POST /session] to [POST 
http://127.0.0.1:8000/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.android.chrome","androidDeviceSerial":"3208c623a27f61e9"}}}
[Chromedriver] Webview version: 'Chrome/63.0.3239.111'
[JSONWP Proxy] Got response with status 200: {"sessionId":"a577f16ef658470ccbc8066131f27b70","status":0,"value":{"acceptSslCerts":true,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"browserName":"chrome","chrome":{"chromedriverVersion":"2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f)"},"cssSelectorsEnabled":true,"databaseEnabled":false,"handlesAlerts":true,"hasTouchScreen":true,"javascriptEnabled":true,"locationContextEnabled":true,"mobileEmulationEnabled":false,"nativeEvents":true,"pageLoadStrategy":"normal","platform":"ANDROID","rotatable":false,"setWindowRect":false,"takesHeapSnapshot":true,"takesScreenshot":true,"unexpectedAlertBehaviour":"","version":"63.0.3239.111","webStorageEnabled":true}}
[Chromedriver] Changed state to 'online'
[Appium] New AndroidDriver session created successfully, session 9aa0ede8-867f-41a1-b4c9-61416598aaf0 added to master session list
[BaseDriver] Event 'newSessionStarted' logged at 1542707446213 (15:20:46 GMT+0530 (India Standard Time))
[MJSONWP] Responding to client with driver.createSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"browserName":"chrome","platformName":"Android","deviceName":"3208c623a27f61e9"},"browserName":"chrome","platformName":"Android","deviceName":"3208c623a27f61e9","deviceUDID":"3208c623a27f61e9","platformVersion":"6.0.1","deviceScreenSize":"1080x1920","deviceModel":"SM-G900H","deviceManufacturer":"samsung"}
[HTTP] <-- POST /wd/hub/session 200 33062 ms - 584
[HTTP] --> POST /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0/url {"url":"https://www.google.com"}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[JSONWP Proxy] Proxying [POST /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0/url] to [POST http://127.0.0.1:8000/wd/hub/session/a577f16ef658470ccbc8066131f27b70/url] with body: {"url":"https://www.google.com"}
[JSONWP Proxy] Got response with status 200: {"sessionId":"a577f16ef658470ccbc8066131f27b70","status":0,"value":null}
[JSONWP Proxy] Replacing sessionId a577f16ef658470ccbc8066131f27b70 with 9aa0ede8-867f-41a1-b4c9-61416598aaf0
[HTTP] <-- POST /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0/url 200 4603 ms - 76
[HTTP] --> POST /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0/element {"using":"xpath","value":"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.view.ViewGroup/android.widget.FrameLayout[1]/android.widget.FrameLayout[2]/android.webkit.WebView/android.view.View/android.view.View[3]/android.view.View[1]/android.view.View/android.view.View[2]/android.view.View[3]"}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[JSONWP Proxy] Proxying [POST /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0/element] to [POST http://127.0.0.1:8000/wd/hub/session/a577f16ef658470ccbc8066131f27b70/element] with body: {"using":"xpath","value":"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.view.ViewGroup/android.widget.FrameLayout[1]/android.widget.FrameLayout[2]/android.webkit.WebView/android.view.View/android.view.View[3]/android.view.View[1]/android.view.View/android.view.View[2]/android.view.View[3]"}
[JSONWP Proxy] Got response with status 200: {"sessionId":"a577f16ef658470ccbc8066131f27b70","status":7,"value":{"message":"no such element: Unable to locate element: {"method":"xpath","selector":"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.view.ViewGroup/android.widget.FrameLayout[1]/android.widget.FrameLayout[2]/android.webkit.WebView/android.view.View/android.view.View[3]/android.view.View[1]/android.view.View/android.view.View[2]/android.view.View[3]"}n (Session info: chrome=63.0.3239.111)n (Driver info: chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f),platform=Windows NT 10.0.14393 x86_64)"}}
[JSONWP Proxy] Replacing sessionId a577f16ef658470ccbc8066131f27b70 with 9aa0ede8-867f-41a1-b4c9-61416598aaf0
[HTTP] <-- POST /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0/element 200 205 ms - 733
[HTTP] --> DELETE /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0 {}
[MJSONWP] Calling AppiumDriver.deleteSession() with args: ["9aa0ede8-867f-41a1-b4c9-61416598aaf0"]
[BaseDriver] Event 'quitSessionRequested' logged at 1542707451117 (15:20:51 GMT+0530 (India Standard Time))
[Appium] Removing session 9aa0ede8-867f-41a1-b4c9-61416598aaf0 from our master session list
[AndroidDriver] Shutting down Android driver
[AndroidDriver] Stopping chromedriver for context CHROMIUM
[Chromedriver] Changed state to 'stopping'
[JSONWP Proxy] Proxying [DELETE /] to [DELETE http://127.0.0.1:8000/wd/hub/session/a577f16ef658470ccbc8066131f27b70] with no body
[JSONWP Proxy] Got response with status 200: "{"sessionId":"a577f16ef658470ccbc8066131f27b70","status":0,"value":null}"
[Chromedriver] Changed state to 'stopped'









share|improve this question

























  • possibly can be a wait issue

    – Amit Jain
    Nov 21 '18 at 6:16











  • Added sufficient wait times. Doesn't seem to work even while debugging.

    – testergirl
    Nov 21 '18 at 8:44
















1















I have obtained locators using appium inspector . The obtained element works well during recording in appium inspector. But when I run the test case, appium fails to identify the element.
Below is the log in the server



    [JSONWP Proxy] Proxying [POST /session] to [POST 
http://127.0.0.1:8000/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.android.chrome","androidDeviceSerial":"3208c623a27f61e9"}}}
[Chromedriver] Webview version: 'Chrome/63.0.3239.111'
[JSONWP Proxy] Got response with status 200: {"sessionId":"a577f16ef658470ccbc8066131f27b70","status":0,"value":{"acceptSslCerts":true,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"browserName":"chrome","chrome":{"chromedriverVersion":"2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f)"},"cssSelectorsEnabled":true,"databaseEnabled":false,"handlesAlerts":true,"hasTouchScreen":true,"javascriptEnabled":true,"locationContextEnabled":true,"mobileEmulationEnabled":false,"nativeEvents":true,"pageLoadStrategy":"normal","platform":"ANDROID","rotatable":false,"setWindowRect":false,"takesHeapSnapshot":true,"takesScreenshot":true,"unexpectedAlertBehaviour":"","version":"63.0.3239.111","webStorageEnabled":true}}
[Chromedriver] Changed state to 'online'
[Appium] New AndroidDriver session created successfully, session 9aa0ede8-867f-41a1-b4c9-61416598aaf0 added to master session list
[BaseDriver] Event 'newSessionStarted' logged at 1542707446213 (15:20:46 GMT+0530 (India Standard Time))
[MJSONWP] Responding to client with driver.createSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"browserName":"chrome","platformName":"Android","deviceName":"3208c623a27f61e9"},"browserName":"chrome","platformName":"Android","deviceName":"3208c623a27f61e9","deviceUDID":"3208c623a27f61e9","platformVersion":"6.0.1","deviceScreenSize":"1080x1920","deviceModel":"SM-G900H","deviceManufacturer":"samsung"}
[HTTP] <-- POST /wd/hub/session 200 33062 ms - 584
[HTTP] --> POST /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0/url {"url":"https://www.google.com"}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[JSONWP Proxy] Proxying [POST /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0/url] to [POST http://127.0.0.1:8000/wd/hub/session/a577f16ef658470ccbc8066131f27b70/url] with body: {"url":"https://www.google.com"}
[JSONWP Proxy] Got response with status 200: {"sessionId":"a577f16ef658470ccbc8066131f27b70","status":0,"value":null}
[JSONWP Proxy] Replacing sessionId a577f16ef658470ccbc8066131f27b70 with 9aa0ede8-867f-41a1-b4c9-61416598aaf0
[HTTP] <-- POST /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0/url 200 4603 ms - 76
[HTTP] --> POST /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0/element {"using":"xpath","value":"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.view.ViewGroup/android.widget.FrameLayout[1]/android.widget.FrameLayout[2]/android.webkit.WebView/android.view.View/android.view.View[3]/android.view.View[1]/android.view.View/android.view.View[2]/android.view.View[3]"}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[JSONWP Proxy] Proxying [POST /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0/element] to [POST http://127.0.0.1:8000/wd/hub/session/a577f16ef658470ccbc8066131f27b70/element] with body: {"using":"xpath","value":"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.view.ViewGroup/android.widget.FrameLayout[1]/android.widget.FrameLayout[2]/android.webkit.WebView/android.view.View/android.view.View[3]/android.view.View[1]/android.view.View/android.view.View[2]/android.view.View[3]"}
[JSONWP Proxy] Got response with status 200: {"sessionId":"a577f16ef658470ccbc8066131f27b70","status":7,"value":{"message":"no such element: Unable to locate element: {"method":"xpath","selector":"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.view.ViewGroup/android.widget.FrameLayout[1]/android.widget.FrameLayout[2]/android.webkit.WebView/android.view.View/android.view.View[3]/android.view.View[1]/android.view.View/android.view.View[2]/android.view.View[3]"}n (Session info: chrome=63.0.3239.111)n (Driver info: chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f),platform=Windows NT 10.0.14393 x86_64)"}}
[JSONWP Proxy] Replacing sessionId a577f16ef658470ccbc8066131f27b70 with 9aa0ede8-867f-41a1-b4c9-61416598aaf0
[HTTP] <-- POST /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0/element 200 205 ms - 733
[HTTP] --> DELETE /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0 {}
[MJSONWP] Calling AppiumDriver.deleteSession() with args: ["9aa0ede8-867f-41a1-b4c9-61416598aaf0"]
[BaseDriver] Event 'quitSessionRequested' logged at 1542707451117 (15:20:51 GMT+0530 (India Standard Time))
[Appium] Removing session 9aa0ede8-867f-41a1-b4c9-61416598aaf0 from our master session list
[AndroidDriver] Shutting down Android driver
[AndroidDriver] Stopping chromedriver for context CHROMIUM
[Chromedriver] Changed state to 'stopping'
[JSONWP Proxy] Proxying [DELETE /] to [DELETE http://127.0.0.1:8000/wd/hub/session/a577f16ef658470ccbc8066131f27b70] with no body
[JSONWP Proxy] Got response with status 200: "{"sessionId":"a577f16ef658470ccbc8066131f27b70","status":0,"value":null}"
[Chromedriver] Changed state to 'stopped'









share|improve this question

























  • possibly can be a wait issue

    – Amit Jain
    Nov 21 '18 at 6:16











  • Added sufficient wait times. Doesn't seem to work even while debugging.

    – testergirl
    Nov 21 '18 at 8:44














1












1








1








I have obtained locators using appium inspector . The obtained element works well during recording in appium inspector. But when I run the test case, appium fails to identify the element.
Below is the log in the server



    [JSONWP Proxy] Proxying [POST /session] to [POST 
http://127.0.0.1:8000/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.android.chrome","androidDeviceSerial":"3208c623a27f61e9"}}}
[Chromedriver] Webview version: 'Chrome/63.0.3239.111'
[JSONWP Proxy] Got response with status 200: {"sessionId":"a577f16ef658470ccbc8066131f27b70","status":0,"value":{"acceptSslCerts":true,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"browserName":"chrome","chrome":{"chromedriverVersion":"2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f)"},"cssSelectorsEnabled":true,"databaseEnabled":false,"handlesAlerts":true,"hasTouchScreen":true,"javascriptEnabled":true,"locationContextEnabled":true,"mobileEmulationEnabled":false,"nativeEvents":true,"pageLoadStrategy":"normal","platform":"ANDROID","rotatable":false,"setWindowRect":false,"takesHeapSnapshot":true,"takesScreenshot":true,"unexpectedAlertBehaviour":"","version":"63.0.3239.111","webStorageEnabled":true}}
[Chromedriver] Changed state to 'online'
[Appium] New AndroidDriver session created successfully, session 9aa0ede8-867f-41a1-b4c9-61416598aaf0 added to master session list
[BaseDriver] Event 'newSessionStarted' logged at 1542707446213 (15:20:46 GMT+0530 (India Standard Time))
[MJSONWP] Responding to client with driver.createSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"browserName":"chrome","platformName":"Android","deviceName":"3208c623a27f61e9"},"browserName":"chrome","platformName":"Android","deviceName":"3208c623a27f61e9","deviceUDID":"3208c623a27f61e9","platformVersion":"6.0.1","deviceScreenSize":"1080x1920","deviceModel":"SM-G900H","deviceManufacturer":"samsung"}
[HTTP] <-- POST /wd/hub/session 200 33062 ms - 584
[HTTP] --> POST /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0/url {"url":"https://www.google.com"}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[JSONWP Proxy] Proxying [POST /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0/url] to [POST http://127.0.0.1:8000/wd/hub/session/a577f16ef658470ccbc8066131f27b70/url] with body: {"url":"https://www.google.com"}
[JSONWP Proxy] Got response with status 200: {"sessionId":"a577f16ef658470ccbc8066131f27b70","status":0,"value":null}
[JSONWP Proxy] Replacing sessionId a577f16ef658470ccbc8066131f27b70 with 9aa0ede8-867f-41a1-b4c9-61416598aaf0
[HTTP] <-- POST /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0/url 200 4603 ms - 76
[HTTP] --> POST /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0/element {"using":"xpath","value":"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.view.ViewGroup/android.widget.FrameLayout[1]/android.widget.FrameLayout[2]/android.webkit.WebView/android.view.View/android.view.View[3]/android.view.View[1]/android.view.View/android.view.View[2]/android.view.View[3]"}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[JSONWP Proxy] Proxying [POST /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0/element] to [POST http://127.0.0.1:8000/wd/hub/session/a577f16ef658470ccbc8066131f27b70/element] with body: {"using":"xpath","value":"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.view.ViewGroup/android.widget.FrameLayout[1]/android.widget.FrameLayout[2]/android.webkit.WebView/android.view.View/android.view.View[3]/android.view.View[1]/android.view.View/android.view.View[2]/android.view.View[3]"}
[JSONWP Proxy] Got response with status 200: {"sessionId":"a577f16ef658470ccbc8066131f27b70","status":7,"value":{"message":"no such element: Unable to locate element: {"method":"xpath","selector":"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.view.ViewGroup/android.widget.FrameLayout[1]/android.widget.FrameLayout[2]/android.webkit.WebView/android.view.View/android.view.View[3]/android.view.View[1]/android.view.View/android.view.View[2]/android.view.View[3]"}n (Session info: chrome=63.0.3239.111)n (Driver info: chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f),platform=Windows NT 10.0.14393 x86_64)"}}
[JSONWP Proxy] Replacing sessionId a577f16ef658470ccbc8066131f27b70 with 9aa0ede8-867f-41a1-b4c9-61416598aaf0
[HTTP] <-- POST /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0/element 200 205 ms - 733
[HTTP] --> DELETE /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0 {}
[MJSONWP] Calling AppiumDriver.deleteSession() with args: ["9aa0ede8-867f-41a1-b4c9-61416598aaf0"]
[BaseDriver] Event 'quitSessionRequested' logged at 1542707451117 (15:20:51 GMT+0530 (India Standard Time))
[Appium] Removing session 9aa0ede8-867f-41a1-b4c9-61416598aaf0 from our master session list
[AndroidDriver] Shutting down Android driver
[AndroidDriver] Stopping chromedriver for context CHROMIUM
[Chromedriver] Changed state to 'stopping'
[JSONWP Proxy] Proxying [DELETE /] to [DELETE http://127.0.0.1:8000/wd/hub/session/a577f16ef658470ccbc8066131f27b70] with no body
[JSONWP Proxy] Got response with status 200: "{"sessionId":"a577f16ef658470ccbc8066131f27b70","status":0,"value":null}"
[Chromedriver] Changed state to 'stopped'









share|improve this question
















I have obtained locators using appium inspector . The obtained element works well during recording in appium inspector. But when I run the test case, appium fails to identify the element.
Below is the log in the server



    [JSONWP Proxy] Proxying [POST /session] to [POST 
http://127.0.0.1:8000/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.android.chrome","androidDeviceSerial":"3208c623a27f61e9"}}}
[Chromedriver] Webview version: 'Chrome/63.0.3239.111'
[JSONWP Proxy] Got response with status 200: {"sessionId":"a577f16ef658470ccbc8066131f27b70","status":0,"value":{"acceptSslCerts":true,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"browserName":"chrome","chrome":{"chromedriverVersion":"2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f)"},"cssSelectorsEnabled":true,"databaseEnabled":false,"handlesAlerts":true,"hasTouchScreen":true,"javascriptEnabled":true,"locationContextEnabled":true,"mobileEmulationEnabled":false,"nativeEvents":true,"pageLoadStrategy":"normal","platform":"ANDROID","rotatable":false,"setWindowRect":false,"takesHeapSnapshot":true,"takesScreenshot":true,"unexpectedAlertBehaviour":"","version":"63.0.3239.111","webStorageEnabled":true}}
[Chromedriver] Changed state to 'online'
[Appium] New AndroidDriver session created successfully, session 9aa0ede8-867f-41a1-b4c9-61416598aaf0 added to master session list
[BaseDriver] Event 'newSessionStarted' logged at 1542707446213 (15:20:46 GMT+0530 (India Standard Time))
[MJSONWP] Responding to client with driver.createSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"browserName":"chrome","platformName":"Android","deviceName":"3208c623a27f61e9"},"browserName":"chrome","platformName":"Android","deviceName":"3208c623a27f61e9","deviceUDID":"3208c623a27f61e9","platformVersion":"6.0.1","deviceScreenSize":"1080x1920","deviceModel":"SM-G900H","deviceManufacturer":"samsung"}
[HTTP] <-- POST /wd/hub/session 200 33062 ms - 584
[HTTP] --> POST /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0/url {"url":"https://www.google.com"}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[JSONWP Proxy] Proxying [POST /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0/url] to [POST http://127.0.0.1:8000/wd/hub/session/a577f16ef658470ccbc8066131f27b70/url] with body: {"url":"https://www.google.com"}
[JSONWP Proxy] Got response with status 200: {"sessionId":"a577f16ef658470ccbc8066131f27b70","status":0,"value":null}
[JSONWP Proxy] Replacing sessionId a577f16ef658470ccbc8066131f27b70 with 9aa0ede8-867f-41a1-b4c9-61416598aaf0
[HTTP] <-- POST /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0/url 200 4603 ms - 76
[HTTP] --> POST /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0/element {"using":"xpath","value":"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.view.ViewGroup/android.widget.FrameLayout[1]/android.widget.FrameLayout[2]/android.webkit.WebView/android.view.View/android.view.View[3]/android.view.View[1]/android.view.View/android.view.View[2]/android.view.View[3]"}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[JSONWP Proxy] Proxying [POST /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0/element] to [POST http://127.0.0.1:8000/wd/hub/session/a577f16ef658470ccbc8066131f27b70/element] with body: {"using":"xpath","value":"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.view.ViewGroup/android.widget.FrameLayout[1]/android.widget.FrameLayout[2]/android.webkit.WebView/android.view.View/android.view.View[3]/android.view.View[1]/android.view.View/android.view.View[2]/android.view.View[3]"}
[JSONWP Proxy] Got response with status 200: {"sessionId":"a577f16ef658470ccbc8066131f27b70","status":7,"value":{"message":"no such element: Unable to locate element: {"method":"xpath","selector":"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.view.ViewGroup/android.widget.FrameLayout[1]/android.widget.FrameLayout[2]/android.webkit.WebView/android.view.View/android.view.View[3]/android.view.View[1]/android.view.View/android.view.View[2]/android.view.View[3]"}n (Session info: chrome=63.0.3239.111)n (Driver info: chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f),platform=Windows NT 10.0.14393 x86_64)"}}
[JSONWP Proxy] Replacing sessionId a577f16ef658470ccbc8066131f27b70 with 9aa0ede8-867f-41a1-b4c9-61416598aaf0
[HTTP] <-- POST /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0/element 200 205 ms - 733
[HTTP] --> DELETE /wd/hub/session/9aa0ede8-867f-41a1-b4c9-61416598aaf0 {}
[MJSONWP] Calling AppiumDriver.deleteSession() with args: ["9aa0ede8-867f-41a1-b4c9-61416598aaf0"]
[BaseDriver] Event 'quitSessionRequested' logged at 1542707451117 (15:20:51 GMT+0530 (India Standard Time))
[Appium] Removing session 9aa0ede8-867f-41a1-b4c9-61416598aaf0 from our master session list
[AndroidDriver] Shutting down Android driver
[AndroidDriver] Stopping chromedriver for context CHROMIUM
[Chromedriver] Changed state to 'stopping'
[JSONWP Proxy] Proxying [DELETE /] to [DELETE http://127.0.0.1:8000/wd/hub/session/a577f16ef658470ccbc8066131f27b70] with no body
[JSONWP Proxy] Got response with status 200: "{"sessionId":"a577f16ef658470ccbc8066131f27b70","status":0,"value":null}"
[Chromedriver] Changed state to 'stopped'






appium appium-android






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 22 '18 at 12:22









Wasiq Bhamla

691159




691159










asked Nov 20 '18 at 13:10









testergirltestergirl

365




365













  • possibly can be a wait issue

    – Amit Jain
    Nov 21 '18 at 6:16











  • Added sufficient wait times. Doesn't seem to work even while debugging.

    – testergirl
    Nov 21 '18 at 8:44



















  • possibly can be a wait issue

    – Amit Jain
    Nov 21 '18 at 6:16











  • Added sufficient wait times. Doesn't seem to work even while debugging.

    – testergirl
    Nov 21 '18 at 8:44

















possibly can be a wait issue

– Amit Jain
Nov 21 '18 at 6:16





possibly can be a wait issue

– Amit Jain
Nov 21 '18 at 6:16













Added sufficient wait times. Doesn't seem to work even while debugging.

– testergirl
Nov 21 '18 at 8:44





Added sufficient wait times. Doesn't seem to work even while debugging.

– testergirl
Nov 21 '18 at 8:44












1 Answer
1






active

oldest

votes


















0














I think the issue is that your screen's element is not available when you tried to interact with that element. If you tried to use implicit wait, it didn't work for me.



You can use explicit wait or Thread.sleep().




Thread.sleep() is not recommended way.




you can use explicit wait using following method:



 public void ExplicitWait(MobileElement element,int timeOutInSeconds) {
(new WebDriverWait(driver, timeOutInSeconds)).until(ExpectedConditions
.visibilityOf(element));
}





share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53393753%2fappium-element-not-identified-during-test-run%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I think the issue is that your screen's element is not available when you tried to interact with that element. If you tried to use implicit wait, it didn't work for me.



    You can use explicit wait or Thread.sleep().




    Thread.sleep() is not recommended way.




    you can use explicit wait using following method:



     public void ExplicitWait(MobileElement element,int timeOutInSeconds) {
    (new WebDriverWait(driver, timeOutInSeconds)).until(ExpectedConditions
    .visibilityOf(element));
    }





    share|improve this answer




























      0














      I think the issue is that your screen's element is not available when you tried to interact with that element. If you tried to use implicit wait, it didn't work for me.



      You can use explicit wait or Thread.sleep().




      Thread.sleep() is not recommended way.




      you can use explicit wait using following method:



       public void ExplicitWait(MobileElement element,int timeOutInSeconds) {
      (new WebDriverWait(driver, timeOutInSeconds)).until(ExpectedConditions
      .visibilityOf(element));
      }





      share|improve this answer


























        0












        0








        0







        I think the issue is that your screen's element is not available when you tried to interact with that element. If you tried to use implicit wait, it didn't work for me.



        You can use explicit wait or Thread.sleep().




        Thread.sleep() is not recommended way.




        you can use explicit wait using following method:



         public void ExplicitWait(MobileElement element,int timeOutInSeconds) {
        (new WebDriverWait(driver, timeOutInSeconds)).until(ExpectedConditions
        .visibilityOf(element));
        }





        share|improve this answer













        I think the issue is that your screen's element is not available when you tried to interact with that element. If you tried to use implicit wait, it didn't work for me.



        You can use explicit wait or Thread.sleep().




        Thread.sleep() is not recommended way.




        you can use explicit wait using following method:



         public void ExplicitWait(MobileElement element,int timeOutInSeconds) {
        (new WebDriverWait(driver, timeOutInSeconds)).until(ExpectedConditions
        .visibilityOf(element));
        }






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 21 '18 at 12:31









        Suban DhyakoSuban Dhyako

        761417




        761417
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53393753%2fappium-element-not-identified-during-test-run%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            這個網誌中的熱門文章

            Xamarin.form Move up view when keyboard appear

            Post-Redirect-Get with Spring WebFlux and Thymeleaf

            Anylogic : not able to use stopDelay()