Can’t find elements on a webview page of an android Native app using Appium and Python

I am not able to find the elements from android.webkit.WebView in my native app.

As you can see in the uiautomatorviewer, I am not able to locate the Text Fields…

I was able to retrieve the username and password field attributes by setting setWebContentsDebuggingEnabled to TRUE, and then I opened the webview in DevTools chrome://inspect/#devices
I have written the Python script to run the app :

# -*- coding: utf-8 -*-
#!/usr/bin/python

import os
import unittest
import time, re
try: 
	import c as s
except:
	ImportError
	sys.stderr.write("Error: Cannot find the 'c.py' file")


from time import sleep
from appium import webdriver

from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities

class AndroidTestsUpdatedMoreOptions(unittest.TestCase):
	@classmethod
	def setUpClass(self):
        	"Setup for the test"
		desired_caps = {}
		desired_caps['browserName']=''
	       	desired_caps['platformName'] = 'Android'
		desired_caps['platformVersion'] = '4.4.2'		
		desired_caps['deviceName'] = 'karthikphone1'
		desired_caps['app'] = s.APK_PATH
		desired_caps['noReset'] = 'true'
		desired_caps['fullReset'] = 'false'
        	desired_caps['appPackage'] = 'com.xxx.yyy'
		desired_caps['app-activity'] = '.SplashActivity'  
		#desired_caps['newCommandTimeout'] = 5000
		desired_caps['app-wait-activity'] = '.AuthorizationCodeActivity' 
        	self.driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)	
			
	def test_User_enters_credentials(self):
		element = WebDriverWait(self.driver, 20).until(EC.presence_of_element_located((By.ID, "toolbar")))
		print (" ")
  	
		self.assertEqual('NATIVE_APP', self.driver.current_context)

		elementUsername = WebDriverWait(self.driver, 20).until(EC.presence_of_element_located((By.XPATH, '//*[@id="oauth2_authorization_email"]')))     	
		elementUsername.send_keys(s.SANDBOX_USERNAME)
       	 	elementUsername.send_keys(Keys.RETURN)
		print('USERNAME- pass')

        	elementPassword = WebDriverWait(self.driver, 20).until(EC.presence_of_element_located((By.XPATH, '//*[@id="oauth2_authorization_password"]')))
		elementPassword.send_keys(s.SANDBOX_PASSWORD)
        	elementPassword.send_keys(Keys.RETURN)
		print('PASSWORD- pass')

		print(' ')
		

#The tearDown() method runs after every test.
	@classmethod
	def tearDownClass(self):
        	"Tear down the test"
       		self.driver.quit()



#---START OF SCRIPT
if __name__ == '__main__':
    suite = unittest.TestLoader().loadTestsFromTestCase(AndroidTestsUpdatedMoreOptions)
    unittest.TextTestRunner(verbosity=2).run(suite)

Output :

karthik@dkarnik2-Vostro-3558:~/appiumworkspace$ python credentials.py 
test_User_enters_credentials(__main__.AndroidTestsUpdatedMoreOptions)

ERROR

======================================================================
ERROR: test_User_enters_credentials(__main__.AndroidTestsUpdatedMoreOptions)
Traceback (most recent call last):
  File "credentials.py", line 69, in test_User_enters_credentials
    elementUsername = WebDriverWait(self.driver, 20).until(EC.presence_of_element_located((By.XPATH, '//*[@id="oauth2_authorization_email"]')))
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/support/wait.py", line 80, in until
    raise TimeoutException(message, screen, stacktrace)
TimeoutException: Message: 


----------------------------------------------------------------------
Ran 1 test in 41.430s

FAILED (errors=1)
karthik@dkarnik2-Vostro-3558:~/appiumworkspace$ 

Where am I going wrong ??
Can someone help me please !!!

2 Likes

Are you absolutely sure you want to work in the NATIVE_APP context when you work with WebViews? The Chrome debugging tools provide you a way to look into debuggable WebViews; the standard native UI inspection tools do not have this ability. In order for Appium to interact with WebViews, Appium starts up a special Chrome driver that uses the same protocol (I think) as the Chrome debugging tools available in your desktop’s Chrome/Chromium software, which allows Appium to access the same debugging capabilities as the Chrome inspector (such as viewing HTML web elements). Appium only uses its packaged Chrome driver after you switch your context to a web context. See Appium’s Python client’s GitHub repo’s README file for samples about how to switch contexts.

I switched between the context…

Here is my updated python script:

# -*- coding: utf-8 -*-
#!/usr/bin/python

import os
import unittest
import time, re
try: 
	import c as s
except:
	ImportError
	sys.stderr.write("Error: Cannot find the 'c.py' file")


from time import sleep
from appium import webdriver

from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities

class credentails(unittest.TestCase):
	@classmethod
	def setUpClass(self):
        	"Setup for the test"
		desired_caps = {}
		desired_caps['browserName']=''
	       	desired_caps['platformName'] = 'Android'
		desired_caps['platformVersion'] = '4.4.2'		
		desired_caps['deviceName'] = 'karthikphone1'
		desired_caps['app'] = s.APK_PATH
		desired_caps['noReset'] = 'true'
		desired_caps['fullReset'] = 'false'
        	desired_caps['appPackage'] = 'com.prueba.maverick'
		desired_caps['app-activity'] = '.SplashActivity'  
		desired_caps['app-wait-activity'] = '.AuthorizationCodeActivity' 
        	self.driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)	
			

	def test_credntials(self):
		element = WebDriverWait(self.driver, 20).until(EC.presence_of_element_located((By.ID, "toolbar")))
		print (" ")
	
		self.assertEqual('NATIVE_APP', self.driver.current_context)

		current = self.driver.current_context

		print current
	
		print self.driver.contexts

		context_name = "WEBVIEW_com.prueba.maverick"

		self.driver.switch_to.context(context_name)

		current = self.driver.current_context

		print current

		elementUsername = WebDriverWait(self.driver, 20).until(EC.presence_of_element_located((By.XPATH, '//*[@id="oauth2_authorization_email"]')))     	
		print 'elementUsername enabled:', elementUsername.is_enabled()
		print 'elementUsername selected:', elementUsername.is_selected()
		elementUsername.send_keys(s.SANDBOX_USERNAME)
       	 	elementUsername.send_keys(Keys.RETURN)
		print('USERNAME- pass')

        	elementPassword = WebDriverWait(self.driver, 20).until(EC.presence_of_element_located((By.XPATH, '//*[@id="oauth2_authorization_password"]')))
		print 'elementPassword enabled:', elementPassword.is_enabled()
		print 'elementPassword selected:', elementPassword.is_selected()
		elementPassword.send_keys(s.SANDBOX_PASSWORD)
        	elementPassword.send_keys(Keys.RETURN)
		print('PASSWORD- pass')
		print(' ')

#The tearDown() method runs after every test.
	@classmethod
	def tearDownClass(self):
        	"Tear down the test"
       		self.driver.quit()

#---START OF SCRIPT
if __name__ == '__main__':
    suite = unittest.TestLoader().loadTestsFromTestCase(credentails)
    unittest.TextTestRunner(verbosity=2).run(suite)

Got this output from the python terminal:

karthik@dkarnik2-Vostro-3558:~/appiumworkspace/appium-1.4.13/submodules/sample-code/examples/python$ python credentails.py 
test_credntials (__main__.credentails) ...  
NATIVE_APP
[u'NATIVE_APP', u'WEBVIEW_com.prueba.maverick']
WEBVIEW_com.prueba.maverick
elementUsername enabled: True
elementUsername selected: False
ERROR

======================================================================
ERROR: test_credntials (__main__.credentails)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "credentails.py", line 68, in test_credntials
    elementUsername.send_keys(s.SANDBOX_USERNAME)
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webelement.py", line 334, in send_keys
    self._execute(Command.SEND_KEYS_TO_ELEMENT, {'value': typing})
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webelement.py", line 469, in _execute
    return self._parent.execute(command, params)
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 201, in execute
    self.error_handler.check_response(response)
  File "/usr/local/lib/python2.7/dist-packages/appium/webdriver/errorhandler.py", line 29, in check_response
    raise wde
ElementNotVisibleException: Message: element not visible
  (Session info: webview=30.0.0.0)
  (Driver info: chromedriver=2.21.371461 (633e689b520b25f3e264a2ede6b74ccc23cb636a),platform=Linux 3.13.0-38-generic x86_64)


----------------------------------------------------------------------
Ran 1 test in 29.357s

FAILED (errors=1)

Got this output from the appium terminal:

[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running /home/karthik/selenium/android-sdk-linux/platform-tools/adb with args: ["-P",5037,"-s","X9L0214917000474","shell","ps"]
[debug] [AndroidDriver] Parsed pid: 13934 pkg: com.prueba.maverick!
[debug] [AndroidDriver] from: u0_a1164,13934,2420,977784,70148,ffffffff,00000000,R,com.prueba.maverick
[debug] [AndroidDriver] returning process name: com.prueba.maverick
[debug] [AndroidDriver] Found webviews: ["WEBVIEW_com.prueba.maverick"]
[debug] [AndroidDriver] Available contexts: ["NATIVE_APP","WEBVIEW_com.prueba.maverick"]
[debug] [AndroidDriver] Connecting to chrome-backed webview context 'WEBVIEW_com.prueba.maverick'
[debug] [Chromedriver] Changed state to 'starting'
[Chromedriver] Set chromedriver binary as: /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_64
[Chromedriver] Killing any old chromedrivers, running: ps -ef | grep /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_64 | grep -v grep |grep -e '--port=9515\(\s.*\)\?$' | awk '{ print $2 }' | xargs kill -15
[Chromedriver] Successfully cleaned up old chromedrivers
[Chromedriver] Spawning chromedriver with: /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_64 --url-base=wd/hub --port=9515 --adb-port=5037
[Chromedriver] [STDOUT] Starting ChromeDriver 2.21.371461 (633e689b520b25f3e264a2ede6b74ccc23cb636a) on port 9515
Only local connections are allowed.
[JSONWP Proxy] Proxying [GET /status] to [GET http://127.0.0.1:9515/wd/hub/status] with no body
[JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"\",\"status\":0,\"value\":{\"build\":{\"version\":\"alpha\"},\"os\":{\"arch\":\"x86_64\",\"name\":\"Linux\",\"version\":\"3.13.0-38-generic\"}}}"
[JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:9515/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.prueba.maverick","androidUseRunningApp":true,"androidDeviceSerial":"X9L0214917000474"}}}
[JSONWP Proxy] Got response with status 200: {"sessionId":"a72f9f5c1513fc26617feb0b53420433","status":0,"value":{"acceptSslCerts":true,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"browserName":"chrome","chrome":{"chromedr...
[debug] [Chromedriver] Changed state to 'online'
[MJSONWP] Responding to client with driver.setContext() result: null
[HTTP] <-- POST /wd/hub/session/67cf280f-3bfb-4846-aa16-ce497b01712a/context 200 1191 ms - 76 
[HTTP] --> GET /wd/hub/session/67cf280f-3bfb-4846-aa16-ce497b01712a/context 
[MJSONWP] Calling AppiumDriver.getCurrentContext() with args: ["67cf280f-3bfb-4846-aa16-ce497b01712a"]
[MJSONWP] Responding to client with driver.getCurrentContext() result: "WEBVIEW_com.prueba.maverick"
[HTTP] <-- GET /wd/hub/session/67cf280f-3bfb-4846-aa16-ce497b01712a/context 200 4 ms - 101 
[HTTP] --> POST /wd/hub/session/67cf280f-3bfb-4846-aa16-ce497b01712a/element 
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[JSONWP Proxy] Proxying [POST /wd/hub/session/67cf280f-3bfb-4846-aa16-ce497b01712a/element] to [POST http://127.0.0.1:9515/wd/hub/session/a72f9f5c1513fc26617feb0b53420433/element] with body: {"using":"xpath","sessionId":"67cf280f-3bfb-4846-aa16-ce497b01712a","value":"//*[@id=\"oauth2_authorization_email\"]"}
[JSONWP Proxy] Got response with status 200: {"sessionId":"a72f9f5c1513fc26617feb0b53420433","status":0,"value":{"ELEMENT":"0.008110908791422844-1"}}
[JSONWP Proxy] Replacing sessionId a72f9f5c1513fc26617feb0b53420433 with 67cf280f-3bfb-4846-aa16-ce497b01712a
[HTTP] <-- POST /wd/hub/session/67cf280f-3bfb-4846-aa16-ce497b01712a/element 200 7245 ms - 108 
[HTTP] --> GET /wd/hub/session/67cf280f-3bfb-4846-aa16-ce497b01712a/element/0.008110908791422844-1/enabled 
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[JSONWP Proxy] Proxying [GET /wd/hub/session/67cf280f-3bfb-4846-aa16-ce497b01712a/element/0.008110908791422844-1/enabled] to [GET http://127.0.0.1:9515/wd/hub/session/a72f9f5c1513fc26617feb0b53420433/element/0.008110908791422844-1/enabled] with body: {}
[JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"a72f9f5c1513fc26617feb0b53420433\",\"status\":0,\"value\":true}"
[JSONWP Proxy] Replacing sessionId a72f9f5c1513fc26617feb0b53420433 with 67cf280f-3bfb-4846-aa16-ce497b01712a
[HTTP] <-- GET /wd/hub/session/67cf280f-3bfb-4846-aa16-ce497b01712a/element/0.008110908791422844-1/enabled 200 28 ms - 76 
[HTTP] --> GET /wd/hub/session/67cf280f-3bfb-4846-aa16-ce497b01712a/element/0.008110908791422844-1/selected 
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[JSONWP Proxy] Proxying [GET /wd/hub/session/67cf280f-3bfb-4846-aa16-ce497b01712a/element/0.008110908791422844-1/selected] to [GET http://127.0.0.1:9515/wd/hub/session/a72f9f5c1513fc26617feb0b53420433/element/0.008110908791422844-1/selected] with body: {}
[JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"a72f9f5c1513fc26617feb0b53420433\",\"status\":0,\"value\":false}"
[JSONWP Proxy] Replacing sessionId a72f9f5c1513fc26617feb0b53420433 with 67cf280f-3bfb-4846-aa16-ce497b01712a
[HTTP] <-- GET /wd/hub/session/67cf280f-3bfb-4846-aa16-ce497b01712a/element/0.008110908791422844-1/selected 200 54 ms - 77 
[HTTP] --> POST /wd/hub/session/67cf280f-3bfb-4846-aa16-ce497b01712a/element/0.008110908791422844-1/value 
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[JSONWP Proxy] Proxying [POST /wd/hub/session/67cf280f-3bfb-4846-aa16-ce497b01712a/element/0.008110908791422844-1/value] to [POST http://127.0.0.1:9515/wd/hub/session/a72f9f5c1513fc26617feb0b53420433/element/0.008110908791422844-1/value] with body: {"sessionId":"67cf280f-3bfb-4846-aa16-ce497b01712a","id":"0.008110908791422844-1","value":["a","s","h","w","i","n","i",".","k","a","r","k","e","r","a","+","1","@","p","r","u","e","b","a",".","i","o"]}
[JSONWP Proxy] Got response with status 200: {"sessionId":"a72f9f5c1513fc26617feb0b53420433","status":11,"value":{"message":"element not visible\n  (Session info: webview=30.0.0.0)\n  (Driver info: chromedriver=2.21.371461 (633e689b520b25f3e2...
[JSONWP Proxy] Replacing sessionId a72f9f5c1513fc26617feb0b53420433 with 67cf280f-3bfb-4846-aa16-ce497b01712a
[HTTP] <-- POST /wd/hub/session/67cf280f-3bfb-4846-aa16-ce497b01712a/element/0.008110908791422844-1/value 200 267 ms - 268 
[HTTP] --> DELETE /wd/hub/session/67cf280f-3bfb-4846-aa16-ce497b01712a 
[MJSONWP] Calling AppiumDriver.deleteSession() with args: ["67cf280f-3bfb-4846-aa16-ce497b01712a"]
[debug] [AndroidDriver] Shutting down Android driver
[debug] [AndroidDriver] Stopping chromedriver for context WEBVIEW_com.prueba.maverick
[debug] [Chromedriver] Changed state to 'stopping'
[JSONWP Proxy] Proxying [DELETE /] to [DELETE http://127.0.0.1:9515/wd/hub/session/a72f9f5c1513fc26617feb0b53420433] with no body
[JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"a72f9f5c1513fc26617feb0b53420433\",\"status\":0,\"value\":null}"
[debug] [Chromedriver] Changed state to 'stopped'
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running /home/karthik/selenium/android-sdk-linux/platform-tools/adb with args: ["-P",5037,"-s","X9L0214917000474","shell","am","force-stop","com.prueba.maverick"]
[debug] [ADB] Pressing the HOME button
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running /home/karthik/selenium/android-sdk-linux/platform-tools/adb with args: ["-P",5037,"-s","X9L0214917000474","shell","input","keyevent",3]
[debug] [Logcat] Stopping logcat capture
[debug] [AndroidBootstrap] Sending command to android: {"cmd":"shutdown"}
[debug] [AndroidBootstrap] Received command result from bootstrap
[debug] [UiAutomator] Shutting down UiAutomator
[debug] [UiAutomator] Moving to state 'stopping'
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"shutdown"}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type SHUTDOWN
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"value":"OK, shutting down","status":0}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Closed client connection
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: numtests=1
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: stream=.
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: current=1
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS_CODE: 0
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: stream=
[debug] [AndroidBootstrap] [UIAUTO STDOUT] Test results for WatcherResultPrinter=.
[debug] [AndroidBootstrap] [UIAUTO STDOUT] Time: 14.503
[debug] [AndroidBootstrap] [UIAUTO STDOUT] OK (1 test)
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS_CODE: -1
[debug] [UiAutomator] UiAutomator shut down normally
[debug] [UiAutomator] Moving to state 'stopped'
[debug] [ADB] Attempting to kill all uiautomator processes
[debug] [ADB] Getting all processes with uiautomator
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running /home/karthik/selenium/android-sdk-linux/platform-tools/adb with args: ["-P",5037,"-s","X9L0214917000474","shell","ps","uiautomator"]
[ADB] No uiautomator process found to kill, continuing...
[debug] [UiAutomator] Moving to state 'stopped'
[Appium] Removing session 67cf280f-3bfb-4846-aa16-ce497b01712a from our master session list
[debug] [MJSONWP] Received response: null
[debug] [MJSONWP] But deleting session, so not returning
[MJSONWP] Responding to client with driver.deleteSession() result: null
[HTTP] <-- DELETE /wd/hub/session/67cf280f-3bfb-4846-aa16-ce497b01712a 200 1434 ms - 76 

I am not able to enter the username in the text field of webview…
elementUsername.is_enabled() gives TRUE. But,
elementUsername.is_selected() gives FALSE… Don’t know why…!!!

I am getting this error : ElementNotVisibleException: Message: element not visible

What to do next ?!

@afwang
I have a native app which opens a web-view page within the native app to Login. I’m running appium on the app to do some automation test on a web-view page. I need to find and enter the username and password in the respective fields, to move further.

Hmm… that’s very interesting. The best thing I can suggest is to double check that the field you are typing in is actually visible before you start typing stuff in. I don’t have experience with embedded WebViews, so you might have to do a bit of digging yourself.

Hello @Karthik_Uppoor, did you find out what was making the ElementNotVisibleException ?
I have the same issue, but with a Java script and only on emulator devices…

Thanks !

@thfruchart Nope… I din’t find the solution yet… going for manual testing…

I’m getting the same issue on 3 of 4 devices with Node.js Appium scripts against Appium v1.4.16 or v1.5.2.
For me, the issue exist only on Android devices, but works consistently well on Samsung Galaxy 4 with Android v5.0.1.
The test works well on iOS devices.

The issue is not related to a specific element or action - it will fail for any element, whether it is rendered by HTML or by JavaScript and whether I’m trying to use ‘sendKeys’ or simply click the element.

Does NOT work:
driver.waitForElementByCss(’#pluginContainer input[name=username]’)
.sendKeys(‘example’)

Does (surprisingly) work:
driver.waitForElementByCss(’#pluginContainer input[name=username]’)
.execute(‘document.querySelectorAll("#pluginContainer input[name=username]")[0].value = "’ + user.email + ‘"’)

[Appium] Welcome to Appium v1.5.2
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"browserName":"","appium-version":"1.5.2","platformName":"Android","platformVersion":"5.0","deviceName":"Galaxy S5","app":"D:\\dvlp\\Github\\MobileAutoTests\\apps\\Android
\\AutoTest\\app\\build\\outputs\\apk\\app-debug.apk","noSign":true,"noReset":true}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"browserName":"","appium-version":"1.5.2","platformName":"Android","platformVersion":"5.0","deviceName":"Galaxy S5","app":"D:\\dvlp\\Github\\Mobi...
[Appium] Creating new AndroidDriver session
[Appium] Capabilities:
[Appium]   browserName: ''
[Appium]   appium-version: '1.5.2'
[Appium]   platformName: 'Android'
[Appium]   platformVersion: '5.0'
[Appium]   deviceName: 'Galaxy S5'
[Appium]   app: 'D:\\dvlp\\Github\\MobileAutoTests\\apps\\Android\\AutoTest\\app\\build\\outputs\\apk\\app-debug.apk'
[Appium]   noSign: true
[Appium]   noReset: true
[BaseDriver] The following capabilities were provided, but are not recognized by appium: appium-version.
[BaseDriver] Session created with session id: 062f9e9d-9861-4016-91e0-f0b747923834
[debug] [AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_77
[ADB] Checking whether adb is present
[ADB] Using adb.exe from C:\Users\dekel.ba\AppData\Local\Android\sdk\platform-tools\adb.exe
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[AndroidDriver] Using device: 082a9792
[ADB] Checking whether adb is present
[ADB] Using adb.exe from C:\Users\dekel.ba\AppData\Local\Android\sdk\platform-tools\adb.exe
[debug] [ADB] Setting device id to 082a9792
[BaseDriver] Using local app 'D:\dvlp\Github\MobileAutoTests\apps\Android\AutoTest\app\build\outputs\apk\app-debug.apk'
[debug] [AndroidDriver] Checking whether app is actually present
[AndroidDriver] Starting Android session
[debug] [ADB] Running C:\Users\dekel.ba\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","082a9792","wait-for-device"]
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running C:\Users\dekel.ba\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","082a9792","shell","echo","ping"]
[debug] [Logcat] Starting logcat capture
[debug] [AndroidDriver] Pushing settings apk to device...
[debug] [ADB] Running C:\Users\dekel.ba\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","082a9792","install","C:\\Users\\dekel.ba\\AppData\\Roaming\\npm\\node_modules\\appium\\node_modules\\appium-an
droid-driver\\node_modules\\io.appium.settings\\bin\\settings_apk-debug.apk"]
[debug] [AndroidDriver] Pushing unlock helper app to device...
[debug] [ADB] Running C:\Users\dekel.ba\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","082a9792","install","C:\\Users\\dekel.ba\\AppData\\Roaming\\npm\\node_modules\\appium\\node_modules\\appium-an
droid-driver\\node_modules\\appium-unlock\\bin\\unlock_apk-debug.apk"]
[ADB] Getting device platform version
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running C:\Users\dekel.ba\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","082a9792","shell","getprop","ro.build.version.release"]
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running C:\Users\dekel.ba\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","082a9792","shell","dumpsys","window"]
[AndroidDriver] Screen already unlocked, doing nothing
[debug] [AndroidDriver] Parsing package and activity from app manifest
[ADB] Checking whether aapt is present
[ADB] Using aapt.exe from C:\Users\dekel.ba\AppData\Local\Android\sdk\build-tools\23.0.3\aapt.exe
[ADB] Extracting package and launch activity from manifest
[debug] [ADB] badging package: com.gigya.autotest
[debug] [ADB] badging act: com.gigya.autotest.MainActivity
[debug] [AndroidDriver] Parsed package and activity are: com.gigya.autotest/com.gigya.autotest.MainActivity
[AndroidDriver] Remote apk path is /data/local/tmp/abcf30ac93caa139a7d3636b4426f1b1.apk
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running C:\Users\dekel.ba\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","082a9792","shell","ls","/data/local/tmp/abcf30ac93caa139a7d3636b4426f1b1.apk"]
[debug] [AndroidDriver] Checking if app is installed
[debug] [ADB] Getting install status for com.gigya.autotest
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running C:\Users\dekel.ba\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","082a9792","shell","getprop","ro.build.version.sdk"]
[debug] [ADB] Device API level: 21
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running C:\Users\dekel.ba\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","082a9792","shell","pm","list","packages","-3","com.gigya.autotest"]
[debug] [ADB] App is  installed
[debug] [AndroidDriver] Extracting strings from apk D:\dvlp\Github\MobileAutoTests\apps\Android\AutoTest\app\build\outputs\apk\app-debug.apk null C:\Users\dekel.ba\AppData\Local\Temp\com.gigya.autotest
[debug] [ADB] Extracting strings for language: default
[debug] [ADB] Device API level: 21
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running C:\Users\dekel.ba\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","082a9792","shell","getprop","persist.sys.language"]
[debug] [ADB] Current device property 'persist.sys.language': en
[debug] [ADB] No strings.xml for language 'en', getting default strings.xml
[debug] [ADB] Reading strings from converted strings.json
[debug] [ADB] Running C:\Users\dekel.ba\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","082a9792","push","C:\\Users\\dekel.ba\\AppData\\Local\\Temp\\com.gigya.autotest\\strings.json","/data/local/tm
p"]
[debug] [AndroidBootstrap] Watching for bootstrap disconnect
[debug] [ADB] Forwarding system: 4724 to device: 4724
[debug] [ADB] Running C:\Users\dekel.ba\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","082a9792","forward","tcp:4724","tcp:4724"]
[debug] [UiAutomator] Starting UiAutomator
[debug] [UiAutomator] Moving to state 'starting'
[debug] [UiAutomator] Parsing uiautomator jar
[debug] [UiAutomator] Found jar name: 'AppiumBootstrap.jar'
[debug] [ADB] Running C:\Users\dekel.ba\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","082a9792","push","C:\\Users\\dekel.ba\\AppData\\Roaming\\npm\\node_modules\\appium\\node_modules\\appium-andro
id-driver\\node_modules\\appium-android-bootstrap\\bootstrap\\bin\\AppiumBootstrap.jar","/data/local/tmp/"]
[debug] [ADB] Attempting to kill all uiautomator processes
[debug] [ADB] Getting all processes with uiautomator
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running C:\Users\dekel.ba\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","082a9792","shell","ps","uiautomator"]
[ADB] No uiautomator process found to kill, continuing...
[debug] [UiAutomator] Starting UIAutomator
[debug] [ADB] Creating ADB subprocess with args: -P, 5037, -s, 082a9792, shell, uiautomator, runtest, AppiumBootstrap.jar, -c, io.appium.android.bootstrap.Bootstrap, -e, pkg, com.gigya.autotest, -e, disableAndroidWatchers, fals
e, -e, acceptSslCerts, false
[debug] [UiAutomator] Moving to state 'online'
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] json loading complete.
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Registered crash watchers.
[AndroidBootstrap] Android bootstrap socket is now connected
[debug] [ADB] Device API level: 21
[debug] [ADB] Getting connected devices...
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Client connected
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running C:\Users\dekel.ba\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","082a9792","shell","am","start","-n","com.gigya.autotest/com.gigya.autotest.MainActivity","-S","-a","android.in
tent.action.MAIN","-c","android.intent.category.LAUNCHER","-f","0x10200000"]
[debug] [ADB] Waiting for pkg: 'com.gigya.autotest' and activity: 'com.gigya.autotest.MainActivity' to be focused
[debug] [ADB] Possible activities, to be checked: com.gigya.autotest.MainActivity, .MainActivity, .com.gigya.autotest.MainActivity
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running C:\Users\dekel.ba\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","082a9792","shell","dumpsys","window","windows"]
[debug] [ADB] Found package: 'com.gigya.autotest' and activity: '.MainActivity'
[Appium] New AndroidDriver session created successfully, session 062f9e9d-9861-4016-91e0-f0b747923834 added to master session list
[MJSONWP] Responding to client with driver.createSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":tr...
[HTTP] <-- POST /wd/hub/session 200 8398 ms - 784
[HTTP] --> POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/elements {"using":"id","value":"com.gigya.autotest:id/initGigyaSdk"}
[MJSONWP] Calling AppiumDriver.findElements() with args: ["id","com.gigya.autotest:id/initGigyaSdk","062f9e9d-9861-4016-91e0-f0b747923834"]
[debug] [BaseDriver] Waiting up to 0 ms for condition
[debug] [AndroidBootstrap] Sending command to android: {"cmd":"action","action":"find","params":{"strategy":"id","selector":"com.gigya.autotest:id/initGigyaSdk","context":"","multiple":true}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"id","selector":"com.gigya.autotest:id/initGigyaSdk","context":"","multiple":true}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: find
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding 'com.gigya.autotest:id/initGigyaSdk' using 'ID' with the contextId: '' multiple: true
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[RESOURCE_ID=com.gigya.autotest:id/initGigyaSdk]
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements selector:UiSelector[RESOURCE_ID=com.gigya.autotest:id/initGigyaSdk]
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Element[] is null: (0)
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements tmp selector:UiSelector[INSTANCE=0, RESOURCE_ID=com.gigya.autotest:id/initGigyaSdk]
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Element[] is null: (1)
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements tmp selector:UiSelector[INSTANCE=1, RESOURCE_ID=com.gigya.autotest:id/initGigyaSdk]
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":0,"value":[{"ELEMENT":"1"}]}
[debug] [AndroidBootstrap] Received command result from bootstrap
[MJSONWP] Responding to client with driver.findElements() result: [{"ELEMENT":"1"}]
[HTTP] <-- POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/elements 200 1425 ms - 89
[HTTP] --> POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/element/1/click {}
[MJSONWP] Calling AppiumDriver.click() with args: ["1","062f9e9d-9861-4016-91e0-f0b747923834"]
[debug] [AndroidBootstrap] Sending command to android: {"cmd":"action","action":"element:click","params":{"elementId":"1"}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"element:click","params":{"elementId":"1"}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: click
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":0,"value":true}
[debug] [AndroidBootstrap] Received command result from bootstrap
[MJSONWP] Responding to client with driver.click() result: true
[HTTP] <-- POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/element/1/click 200 899 ms - 76
[HTTP] --> POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/elements {"using":"id","value":"com.gigya.autotest:id/globalResultLabel"}
[MJSONWP] Calling AppiumDriver.findElements() with args: ["id","com.gigya.autotest:id/globalResultLabel","062f9e9d-9861-4016-91e0-f0b747923834"]
[debug] [BaseDriver] Waiting up to 0 ms for condition
[debug] [AndroidBootstrap] Sending command to android: {"cmd":"action","action":"find","params":{"strategy":"id","selector":"com.gigya.autotest:id/globalResultLabel","context":"","multiple":true}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"id","selector":"com.gigya.autotest:id/globalResultLabel","context":"","multiple":true}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: find
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding 'com.gigya.autotest:id/globalResultLabel' using 'ID' with the contextId: '' multiple: true
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[RESOURCE_ID=com.gigya.autotest:id/globalResultLabel]
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements selector:UiSelector[RESOURCE_ID=com.gigya.autotest:id/globalResultLabel]
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Element[] is null: (0)
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements tmp selector:UiSelector[INSTANCE=0, RESOURCE_ID=com.gigya.autotest:id/globalResultLabel]
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Element[] is null: (1)
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements tmp selector:UiSelector[INSTANCE=1, RESOURCE_ID=com.gigya.autotest:id/globalResultLabel]
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":0,"value":[{"ELEMENT":"2"}]}
[debug] [AndroidBootstrap] Received command result from bootstrap
[MJSONWP] Responding to client with driver.findElements() result: [{"ELEMENT":"2"}]
[HTTP] <-- POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/elements 200 678 ms - 89
[HTTP] --> GET /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/element/2/text {}
[MJSONWP] Calling AppiumDriver.getText() with args: ["2","062f9e9d-9861-4016-91e0-f0b747923834"]
[debug] [AndroidBootstrap] Sending command to android: {"cmd":"action","action":"element:getText","params":{"elementId":"2"}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"element:getText","params":{"elementId":"2"}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: getText
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":0,"value":"GigyaSDK initialized in Production with APIKey 3_skvVY_Fj-7O8WRvPcw1J7XSlA53TUi0md8VLujq97GfEkRVx_CWAIgkmr2ysdgTa"}
[debug] [AndroidBootstrap] Received command result from bootstrap
[MJSONWP] Responding to client with driver.getText() result: "GigyaSDK initialized in Production with APIKey 3_skvVY_Fj-7O8WRvPcw1J7XSlA53TUi0md8VLujq97GfEkRVx_CWAIgkmr2ysdgTa"
[HTTP] <-- GET /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/element/2/text 200 24 ms - 187
[HTTP] --> POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/elements {"using":"id","value":"com.gigya.autotest:id/showScreenSetTestSuite"}
[MJSONWP] Calling AppiumDriver.findElements() with args: ["id","com.gigya.autotest:id/showScreenSetTestSuite","062f9e9d-9861-4016-91e0-f0b747923834"]
[debug] [BaseDriver] Waiting up to 0 ms for condition
[debug] [AndroidBootstrap] Sending command to android: {"cmd":"action","action":"find","params":{"strategy":"id","selector":"com.gigya.autotest:id/showScreenSetTestSuite","context":"","multiple":true}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"id","selector":"com.gigya.autotest:id/showScreenSetTestSuite","context":"","multiple":true}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: find
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding 'com.gigya.autotest:id/showScreenSetTestSuite' using 'ID' with the contextId: '' multiple: true
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[RESOURCE_ID=com.gigya.autotest:id/showScreenSetTestSuite]
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements selector:UiSelector[RESOURCE_ID=com.gigya.autotest:id/showScreenSetTestSuite]
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Element[] is null: (0)
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements tmp selector:UiSelector[INSTANCE=0, RESOURCE_ID=com.gigya.autotest:id/showScreenSetTestSuite]
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Element[] is null: (1)
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements tmp selector:UiSelector[INSTANCE=1, RESOURCE_ID=com.gigya.autotest:id/showScreenSetTestSuite]
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":0,"value":[{"ELEMENT":"3"}]}
[debug] [AndroidBootstrap] Received command result from bootstrap
[MJSONWP] Responding to client with driver.findElements() result: [{"ELEMENT":"3"}]
[HTTP] <-- POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/elements 200 43 ms - 89
[HTTP] --> POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/element/3/click {}
[MJSONWP] Calling AppiumDriver.click() with args: ["3","062f9e9d-9861-4016-91e0-f0b747923834"]
[debug] [AndroidBootstrap] Sending command to android: {"cmd":"action","action":"element:click","params":{"elementId":"3"}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"element:click","params":{"elementId":"3"}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: click
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":0,"value":true}
[debug] [AndroidBootstrap] Received command result from bootstrap
[MJSONWP] Responding to client with driver.click() result: true
[HTTP] <-- POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/element/3/click 200 352 ms - 76
[HTTP] --> GET /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834 {}
[MJSONWP] Calling AppiumDriver.getSession() with args: ["062f9e9d-9861-4016-91e0-f0b747923834"]
[MJSONWP] Responding to client with driver.getSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":tr...
[HTTP] <-- GET /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834 200 3 ms - 784
[HTTP] --> POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/elements {"using":"id","value":"com.gigya.autotest:id/useWebviewCheckBox"}
[MJSONWP] Calling AppiumDriver.findElements() with args: ["id","com.gigya.autotest:id/useWebviewCheckBox","062f9e9d-9861-4016-91e0-f0b747923834"]
[debug] [BaseDriver] Waiting up to 0 ms for condition
[debug] [AndroidBootstrap] Sending command to android: {"cmd":"action","action":"find","params":{"strategy":"id","selector":"com.gigya.autotest:id/useWebviewCheckBox","context":"","multiple":true}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"id","selector":"com.gigya.autotest:id/useWebviewCheckBox","context":"","multiple":true}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: find
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding 'com.gigya.autotest:id/useWebviewCheckBox' using 'ID' with the contextId: '' multiple: true
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[RESOURCE_ID=com.gigya.autotest:id/useWebviewCheckBox]
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements selector:UiSelector[RESOURCE_ID=com.gigya.autotest:id/useWebviewCheckBox]
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Element[] is null: (0)
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements tmp selector:UiSelector[INSTANCE=0, RESOURCE_ID=com.gigya.autotest:id/useWebviewCheckBox]
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Element[] is null: (1)
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements tmp selector:UiSelector[INSTANCE=1, RESOURCE_ID=com.gigya.autotest:id/useWebviewCheckBox]
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":0,"value":[{"ELEMENT":"4"}]}
[debug] [AndroidBootstrap] Received command result from bootstrap
[MJSONWP] Responding to client with driver.findElements() result: [{"ELEMENT":"4"}]
[HTTP] <-- POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/elements 200 1019 ms - 89
[HTTP] --> GET /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/element/4/attribute/checked {}
[MJSONWP] Calling AppiumDriver.getAttribute() with args: ["checked","4","062f9e9d-9861-4016-91e0-f0b747923834"]
[debug] [AndroidBootstrap] Sending command to android: {"cmd":"action","action":"element:getAttribute","params":{"attribute":"checked","elementId":"4"}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"element:getAttribute","params":{"attribute":"checked","elementId":"4"}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: getAttribute
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":0,"value":"false"}
[debug] [AndroidBootstrap] Received command result from bootstrap
[MJSONWP] Responding to client with driver.getAttribute() result: "false"
[HTTP] <-- GET /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/element/4/attribute/checked 200 27 ms - 79
[HTTP] --> POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/element {"using":"id","value":"com.gigya.autotest:id/showScreenSetDialog"}
[MJSONWP] Calling AppiumDriver.findElement() with args: ["id","com.gigya.autotest:id/showScreenSetDialog","062f9e9d-9861-4016-91e0-f0b747923834"]
[debug] [BaseDriver] Waiting up to 0 ms for condition
[debug] [AndroidBootstrap] Sending command to android: {"cmd":"action","action":"find","params":{"strategy":"id","selector":"com.gigya.autotest:id/showScreenSetDialog","context":"","multiple":false}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"id","selector":"com.gigya.autotest:id/showScreenSetDialog","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.gigya.autotest:id/showScreenSetDialog' using 'ID' with the contextId: '' multiple: false
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=com.gigya.autotest:id/showScreenSetDialog]
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":0,"value":{"ELEMENT":"5"}}
[debug] [AndroidBootstrap] Received command result from bootstrap
[MJSONWP] Responding to client with driver.findElement() result: {"ELEMENT":"5"}
[HTTP] <-- POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/element 200 34 ms - 87
[HTTP] --> POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/element/5/click {}
[MJSONWP] Calling AppiumDriver.click() with args: ["5","062f9e9d-9861-4016-91e0-f0b747923834"]
[debug] [AndroidBootstrap] Sending command to android: {"cmd":"action","action":"element:click","params":{"elementId":"5"}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"element:click","params":{"elementId":"5"}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: click
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":0,"value":true}
[debug] [AndroidBootstrap] Received command result from bootstrap
[MJSONWP] Responding to client with driver.click() result: true
[HTTP] <-- POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/element/5/click 200 197 ms - 76
[HTTP] --> GET /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/contexts {}
[MJSONWP] Calling AppiumDriver.getContexts() with args: ["062f9e9d-9861-4016-91e0-f0b747923834"]
[debug] [AndroidDriver] Getting a list of available webviews
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running C:\Users\dekel.ba\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","082a9792","shell","cat","/proc/net/unix"]
[debug] [AndroidDriver] WEBVIEW_30269 mapped to pid 30269
[debug] [AndroidDriver] Getting process name for webview
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running C:\Users\dekel.ba\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","082a9792","shell","ps"]
[debug] [AndroidDriver] Parsed pid: 30269 pkg: com.gigya.autotest!
[debug] [AndroidDriver] from: u0_a213,30269,319,2309572,137316,ffffffff,00000000,S,com.gigya.autotest
[debug] [AndroidDriver] returning process name: com.gigya.autotest
[debug] [AndroidDriver] Found webviews: ["WEBVIEW_com.gigya.autotest"]
[debug] [AndroidDriver] Available contexts: ["NATIVE_APP","WEBVIEW_com.gigya.autotest"]
[MJSONWP] Responding to client with driver.getContexts() result: ["NATIVE_APP","WEBVIEW_com.gigya.autotest"]
[HTTP] <-- GET /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/contexts 200 387 ms - 115
[HTTP] --> POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/context {"name":"WEBVIEW_com.gigya.autotest"}
[MJSONWP] Calling AppiumDriver.setContext() with args: ["WEBVIEW_com.gigya.autotest","062f9e9d-9861-4016-91e0-f0b747923834"]
[debug] [AndroidDriver] Getting a list of available webviews
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running C:\Users\dekel.ba\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","082a9792","shell","cat","/proc/net/unix"]
[debug] [AndroidDriver] WEBVIEW_30269 mapped to pid 30269
[debug] [AndroidDriver] Getting process name for webview
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running C:\Users\dekel.ba\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","082a9792","shell","ps"]
[debug] [AndroidDriver] Parsed pid: 30269 pkg: com.gigya.autotest!
[debug] [AndroidDriver] from: u0_a213,30269,319,2309572,137580,ffffffff,00000000,S,com.gigya.autotest
[debug] [AndroidDriver] returning process name: com.gigya.autotest
[debug] [AndroidDriver] Found webviews: ["WEBVIEW_com.gigya.autotest"]
[debug] [AndroidDriver] Available contexts: ["NATIVE_APP","WEBVIEW_com.gigya.autotest"]
[debug] [AndroidDriver] Connecting to chrome-backed webview context 'WEBVIEW_com.gigya.autotest'
[debug] [Chromedriver] Changed state to 'starting'
[Chromedriver] Set chromedriver binary as: C:\Users\dekel.ba\AppData\Roaming\npm\node_modules\appium\node_modules\appium-android-driver\node_modules\appium-chromedriver\chromedriver\win\chromedriver.exe
[Chromedriver] Killing any old chromedrivers, running: FOR /F "usebackq tokens=5" %a in (`netstat -nao ^| findstr /R /C:"9515 "`) do (FOR /F "usebackq" %b in (`TASKLIST /FI "PID eq %a" ^| findstr /I chromedriver.exe`) do (IF NO
T %b=="" TASKKILL /F /PID %a))
[Chromedriver] No old chromedrivers seemed to exist
[Chromedriver] Spawning chromedriver with: C:\Users\dekel.ba\AppData\Roaming\npm\node_modules\appium\node_modules\appium-android-driver\node_modules\appium-chromedriver\chromedriver\win\chromedriver.exe --url-base=wd/hub --port
=9515 --adb-port=5037
[Chromedriver] [STDOUT] Starting ChromeDriver 2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4) on port 9515
Only local connections are allowed.
[JSONWP Proxy] Proxying [GET /status] to [GET http://127.0.0.1:9515/wd/hub/status] with no body
[JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"\",\"status\":0,\"value\":{\"build\":{\"version\":\"alpha\"},\"os\":{\"arch\":\"x86_64\",\"name\":\"Windows NT\",\"version\":\"6.3\"}}}"
[JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:9515/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.gigya.autotest","androidUseRunningApp":true,"androidDeviceSerial":
"082a9792"}}}
[JSONWP Proxy] Got response with status 200: {"sessionId":"aed87cb2e567c55e218a31008a8f094a","status":0,"value":{"acceptSslCerts":true,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"browserName":"chrome","chr
ome":{"chromedr...
[debug] [Chromedriver] Changed state to 'online'
[MJSONWP] Responding to client with driver.setContext() result: null
[HTTP] <-- POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/context 200 1355 ms - 76
[HTTP] --> GET /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/window_handles {}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[JSONWP Proxy] Proxying [GET /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/window_handles] to [GET http://127.0.0.1:9515/wd/hub/session/aed87cb2e567c55e218a31008a8f094a/window_handles] with body: {}
[JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"aed87cb2e567c55e218a31008a8f094a\",\"status\":0,\"value\":[\"CDwindow-CBE3A747-281C-6454-F99D-3BB4E7D1E2D9\"]}"
[JSONWP Proxy] Replacing sessionId aed87cb2e567c55e218a31008a8f094a with 062f9e9d-9861-4016-91e0-f0b747923834
[HTTP] <-- GET /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/window_handles 200 32 ms - 121
[HTTP] --> POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/window {"name":"CDwindow-CBE3A747-281C-6454-F99D-3BB4E7D1E2D9"}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[JSONWP Proxy] Proxying [POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/window] to [POST http://127.0.0.1:9515/wd/hub/session/aed87cb2e567c55e218a31008a8f094a/window] with body: {"name":"CDwindow-CBE3A747-281C-6454-F
99D-3BB4E7D1E2D9"}
[JSONWP Proxy] Got response with status 200: {"sessionId":"aed87cb2e567c55e218a31008a8f094a","status":0,"value":null}
[JSONWP Proxy] Replacing sessionId aed87cb2e567c55e218a31008a8f094a with 062f9e9d-9861-4016-91e0-f0b747923834
[HTTP] <-- POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/window 200 15 ms - 76
[HTTP] --> POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/elements {"using":"css selector","value":"#pluginContainer input[name=username]"}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[JSONWP Proxy] Proxying [POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/elements] to [POST http://127.0.0.1:9515/wd/hub/session/aed87cb2e567c55e218a31008a8f094a/elements] with body: {"using":"css selector","value":"#
pluginContainer input[name=username]"}
[JSONWP Proxy] Got response with status 200: {"sessionId":"aed87cb2e567c55e218a31008a8f094a","status":0,"value":[{"ELEMENT":"0.05545907118357718-1"}]}
[JSONWP Proxy] Replacing sessionId aed87cb2e567c55e218a31008a8f094a with 062f9e9d-9861-4016-91e0-f0b747923834
[HTTP] <-- POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/elements 200 121 ms - 109
[HTTP] --> POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/execute {"script":"document.querySelectorAll(\"#pluginContainer input[name=username]\")[0].value = \"[email protected]\"","args":[]}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[JSONWP Proxy] Proxying [POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/execute] to [POST http://127.0.0.1:9515/wd/hub/session/aed87cb2e567c55e218a31008a8f094a/execute] with body: {"script":"document.querySelectorAll
(\"#pluginContainer input[name=username]\")[0].value = \"[email protected]\"","args":[]}
[JSONWP Proxy] Got response with status 200: {"sessionId":"aed87cb2e567c55e218a31008a8f094a","status":0,"value":null}
[JSONWP Proxy] Replacing sessionId aed87cb2e567c55e218a31008a8f094a with 062f9e9d-9861-4016-91e0-f0b747923834
[HTTP] <-- POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/execute 200 20 ms - 76
[HTTP] --> POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/element {"using":"css selector","value":"#pluginContainer input[name=username]"}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[JSONWP Proxy] Proxying [POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/element] to [POST http://127.0.0.1:9515/wd/hub/session/aed87cb2e567c55e218a31008a8f094a/element] with body: {"using":"css selector","value":"#pl
uginContainer input[name=username]"}
[JSONWP Proxy] Got response with status 200: {"sessionId":"aed87cb2e567c55e218a31008a8f094a","status":0,"value":{"ELEMENT":"0.05545907118357718-1"}}
[JSONWP Proxy] Replacing sessionId aed87cb2e567c55e218a31008a8f094a with 062f9e9d-9861-4016-91e0-f0b747923834
[HTTP] <-- POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/element 200 114 ms - 107
[HTTP] --> POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/element/0.05545907118357718-1/value {"value":["[email protected]"]}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[JSONWP Proxy] Proxying [POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/element/0.05545907118357718-1/value] to [POST http://127.0.0.1:9515/wd/hub/session/aed87cb2e567c55e218a31008a8f094a/element/0.05545907118357718-
1/value] with body: {"value":["[email protected]"]}
[JSONWP Proxy] Got response with status 200: {"sessionId":"aed87cb2e567c55e218a31008a8f094a","status":11,"value":{"message":"element not visible\n  (Session info: webview=37.0.0.0)\n  (Driver info: chromedriver=2.21.371459 (36d
3d07f660ff2bc1b...
[JSONWP Proxy] Replacing sessionId aed87cb2e567c55e218a31008a8f094a with 062f9e9d-9861-4016-91e0-f0b747923834
[HTTP] <-- POST /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834/element/0.05545907118357718-1/value 200 200 ms - 259
[HTTP] --> DELETE /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834 {}
[MJSONWP] Calling AppiumDriver.deleteSession() with args: ["062f9e9d-9861-4016-91e0-f0b747923834"]
[debug] [AndroidDriver] Shutting down Android driver
[debug] [AndroidDriver] Stopping chromedriver for context WEBVIEW_com.gigya.autotest
[debug] [Chromedriver] Changed state to 'stopping'
[JSONWP Proxy] Proxying [DELETE /] to [DELETE http://127.0.0.1:9515/wd/hub/session/aed87cb2e567c55e218a31008a8f094a] with no body
[JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"aed87cb2e567c55e218a31008a8f094a\",\"status\":0,\"value\":null}"
[debug] [Chromedriver] Changed state to 'stopped'
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running C:\Users\dekel.ba\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","082a9792","shell","am","force-stop","com.gigya.autotest"]
[debug] [ADB] Pressing the HOME button
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running C:\Users\dekel.ba\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","082a9792","shell","input","keyevent",3]
[debug] [Logcat] Stopping logcat capture
[debug] [AndroidBootstrap] Sending command to android: {"cmd":"shutdown"}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"shutdown"}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type SHUTDOWN
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":0,"value":"OK, shutting down"}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Closed client connection
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: numtests=1
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: stream=.
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: current=1
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS_CODE: 0
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: stream=
[debug] [AndroidBootstrap] [UIAUTO STDOUT] Test results for WatcherResultPrinter=.
[debug] [AndroidBootstrap] [UIAUTO STDOUT] Time: 25.245
[debug] [AndroidBootstrap] [UIAUTO STDOUT] OK (1 test)
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS_CODE: -1
[debug] [AndroidBootstrap] Received command result from bootstrap
[debug] [UiAutomator] Shutting down UiAutomator
[debug] [UiAutomator] Moving to state 'stopping'
[debug] [UiAutomator] UiAutomator shut down normally
[debug] [UiAutomator] Moving to state 'stopped'
[debug] [ADB] Attempting to kill all uiautomator processes
[debug] [ADB] Getting all processes with uiautomator
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running C:\Users\dekel.ba\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","082a9792","shell","ps","uiautomator"]
[ADB] No uiautomator process found to kill, continuing...
[debug] [UiAutomator] Moving to state 'stopped'
[Appium] Removing session 062f9e9d-9861-4016-91e0-f0b747923834 from our master session list
[debug] [MJSONWP] Received response: null
[debug] [MJSONWP] But deleting session, so not returning
[MJSONWP] Responding to client with driver.deleteSession() result: null
[HTTP] <-- DELETE /wd/hub/session/062f9e9d-9861-4016-91e0-f0b747923834 200 1774 ms - 76
 > CALL sessionCapabilities() 
 > GET /session/:sessionID 
 > RESPONSE sessionCapabilities() {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"browserName":"","appium-version":"1.5.2","platformName":"Android","platformVersion":"5.0","deviceName":"Galaxy S5","app":"D:\\dvlp\\Github\\MobileAutoTests\\apps\\Android\\AutoTest\\app\\build\\outputs\\apk\\app-debug.apk","noSign":true,"noReset":true},"browserName":"","appium-version":"1.5.2","platformName":"Android","platformVersion":"5.0","deviceName":"082a9792","app":"D:\\dvlp\\Github\\MobileAutoTests\\apps\\Android\\AutoTest\\app\\build\\outputs\\apk\\app-debug.apk","noSign":true,"noReset":true}
 > CALL waitForElementById("com.gigya.autotest:id/useWebviewCheckBox",60000) 
 > CALL elements("id","com.gigya.autotest:id/useWebviewCheckBox") 
 > POST /session/:sessionID/elements {"using":"id","value":"com.gigya.autotest:id/useWebviewCheckBox"}
 > RESPONSE elements("id","com.gigya.autotest:id/useWebviewCheckBox") [{"ELEMENT":"4"}]
 > RESPONSE waitForElementById("com.gigya.autotest:id/useWebviewCheckBox",60000) {"ELEMENT":"4"}
 > CALL element.getAttribute("checked") 
 > GET /session/:sessionID/element/4/attribute/checked 
 > RESPONSE element.getAttribute("checked") "false"
 > CALL elementById("com.gigya.autotest:id/showScreenSetDialog") 
 > POST /session/:sessionID/element {"using":"id","value":"com.gigya.autotest:id/showScreenSetDialog"}
 > RESPONSE elementById("com.gigya.autotest:id/showScreenSetDialog") {"ELEMENT":"5"}
 > CALL element.click() 
 > POST /session/:sessionID/element/5/click 
 > RESPONSE element.click() 
 > CALL sleep(15000) 
 > RESPONSE sleep(15000) 
 > CALL contexts() 
 > GET /session/:sessionID/contexts 
 > RESPONSE contexts() ["NATIVE_APP","WEBVIEW_com.gigya.autotest"]
 > CALL context("WEBVIEW_com.gigya.autotest") 
 > POST /session/:sessionID/context {"name":"WEBVIEW_com.gigya.autotest"}
 > RESPONSE context("WEBVIEW_com.gigya.autotest") 
 > CALL windowHandles() 
 > GET /session/:sessionID/window_handles 
 > RESPONSE windowHandles() ["CDwindow-CBE3A747-281C-6454-F99D-3BB4E7D1E2D9"]
 > CALL window("CDwindow-CBE3A747-281C-6454-F99D-3BB4E7D1E2D9") 
 > POST /session/:sessionID/window {"name":"CDwindow-CBE3A747-281C-6454-F99D-3BB4E7D1E2D9"}
 > RESPONSE window("CDwindow-CBE3A747-281C-6454-F99D-3BB4E7D1E2D9") 
 > CALL waitForElementByCss("#pluginContainer input[name=username]",60000) 
 > CALL elements("css selector","#pluginContainer input[name=username]") 
 > POST /session/:sessionID/elements {"using":"css selector","value":"#pluginContainer input[name=username]"}
 > RESPONSE elements("css selector","#pluginContainer input[name=username]") [{"ELEMENT":"0.05545907118357718-1"}]
 > RESPONSE waitForElementByCss("#pluginContainer input[name=username]",60000) {"ELEMENT":"0.05545907118357718-1"}
 > CALL execute("document.querySelectorAll(\"#pluginContainer input[name=username]\")[0].value = \"[email protected]\"") 
 > POST /session/:sessionID/execute {"script":"document.querySelectorAll(\"#pluginContainer input[name=username]\")[0].value = \"[email protected]\"","args":[]}
 > RESPONSE execute("document.querySelectorAll(\"#pluginContainer input[name=username]\")[0].value = \"[email protected]\"") null
 > CALL elementByCss("#pluginContainer input[name=username]") 
 > POST /session/:sessionID/element {"using":"css selector","value":"#pluginContainer input[name=username]"}
 > RESPONSE elementByCss("#pluginContainer input[name=username]") {"ELEMENT":"0.05545907118357718-1"}
 > CALL element.sendKeys("[email protected]") 
 > POST /session/:sessionID/element/0.05545907118357718-1/value {"value":["[email protected]"]}
Error: [element.sendKeys("[email protected]")] Error response status: 11, ElementNotVisible - An element command could not be completed because the element is not visible on the page. Selenium error: element not visible
  (Session info: webview=37.0.0.0)
  (Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Windows NT 6.3 x86_64)
    at exports.newError (D:\dvlp\Github\MobileAutoTests\tests\node_modules\wd\lib\utils.js:139:13)
    at exports.simpleCallback (D:\dvlp\Github\MobileAutoTests\tests\node_modules\wd\lib\callbacks.js:33:23)
    at D:\dvlp\Github\MobileAutoTests\tests\node_modules\wd\lib\webdriver.js:174:5
    at Request._callback (D:\dvlp\Github\MobileAutoTests\tests\node_modules\wd\lib\http-utils.js:87:7)
    at Request.init.self.callback (D:\dvlp\Github\MobileAutoTests\tests\node_modules\wd\node_modules\request\request.js:368:22)
    at Request.<anonymous> (D:\dvlp\Github\MobileAutoTests\tests\node_modules\wd\node_modules\request\request.js:1219:14)
    at IncomingMessage.<anonymous> (D:\dvlp\Github\MobileAutoTests\tests\node_modules\wd\node_modules\request\request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

Hi Karthik,

You can try to get the window size and perform click event on element as their position(x,y) in current window.

@Karthik_Uppoor,

Hi karthik, did u find any solution for this problem? I do have a same situation and webelements in native app is not displayed in Android where as displayed in iOS, i am not sure where the problem is??? If you find any solution please post me…

Thanks!!

Hi Karthik,

Even i am facing the same issue i have launched web browser from my app but not able to locate the element on the browser. any solution for this…Please post. Thanks.

I’m having the same issue, and it’s odd because this wasn’t an issue for me until very recently.

Appium version: 1.6.2
Node version: 7.2.1
OS versions tested: 4.4.2, 5.1 (KitKat, Lollipop)

The app that I’m testing uses a web view for the login page. In order to get the element locators for the username/password/sign_in elements, I’ve always opened the GUI Appium inspector while running Appium 1.6.2 from the command line. This is no longer working, and it’s blocking me from automating the login process. I checked with the developer and confirmed that WebView Debugging is enabled. I also attempted to use the Chrome tools to get this information but it was only able to locate the username field, and I couldn’t find the information that I needed.

Did something change? I’m trying to think if I updated anything that could have affected this. I’ve been troubleshooting a lot of iOS issues because I can’t get tests to run on a real device (ever since updating/modifying my environment to accommodate the XCUITest framework), but this shouldn’t have affected my Android settings. I think I updated node so maybe I’ll try downgrading it, but other than that I’m at a complete loss.

Everything was working wonderfully for Android and iOS until I made the necessary environment changes/upgrades to accommodate the XCUITest framework…

Your issue may be related to:

@Cauthon - Thanks so much for your response. I read through the information at the link you posted. Unfortunately, I don’t think that the issue I’m having is related to the issue described in this post. I tried downgrading Appium to v1.6.0 and I’m still not able to find elements on a webview page on an Android native app. (I even tried downgrading to v1.5.3, but no luck.)

Just to make sure that the problem is not specific to a particular OS or to real device vs emulator, I tried on 4.4.2 (KitKat) and 5.1 (Lollipop) on both real device and emulator. I ran a test and put a breakpoint just after arriving at the login screen. Once the breakpoint was reached, I launched the Appium inspector via the GUI and the screen appeared. One of two things happened:

  1. The Appium inspector showed my login screen but did not show element locators for any elements on the screen
  2. The Appium inspector showed element locators for elements on the title bar, but nothing on the accompanying page (i.e. email/password fields, sign in button)

I tried switching contexts in the Appium inspector (no content, Native App, Webview) but this did nothing.

If I log in manually and refresh the inspector, I can interact with all elements on the pages following the login page.

As I mentioned before, this was working fine until about a week and a half ago. This is a significant blocker for me. @Karthik_Uppoor @Ravikiran_Chowdary @poojakalaiah - Have any of you found a solution to this problem?

Edit: I have verified that no updates were made to the app in the past few weeks.

Edit II: The developer is not using UIAutomator2, so I have not added to my desired capabilities.

Okay - I have a fix. It’s not the best, but it gets me unblocked.

In the past, I never had to switch the context to get the element locators for items on the webview login page. It seems that I now have to do this. The caveat is that it only works on OS versions lower than 6.0 (Marshmallow). I tried it on Nougat and got the “no such session” error that is mentioned in this thread: https://github.com/appium/appium/issues/6634 (I did make sure to update Chromedriver in my pom file as suggested in the thread, but it did not help.)

The code that I used for switching to the webview context is as follows:

Set<String> contextNames = driver.getContextHandles();
    for (String c : contextNames) {
        if (c.contains("WEBVIEW")) {
	    driver.context(c);
	}
    } // I'll switch back to the Native App context after login.

After switching to the webview context I got no response from the Appium inspector, so I used Chrome tools to get the css selectors for the username, password and sign in elements. The following link explains how to inspect a remote mobile device using Chrome dev tools: https://developers.google.com/web/tools/chrome-devtools/remote-debugging/

Hopefully I’ll get this working on 6.0+, but for right now I’m just glad to have a solution.

2 Likes

Hi,

Is your existing appium setup is supporting Nougat devices,

what appium version have you installed

@Karthik_Uppoor, I also has this issue, if you find solution please @me, thanks

I am facing the same here.

I have a login page in a webview, so I am able to identify those elements on appium, but they are not being visible on code (I am using Python with Pytest).

I am also trying to use switch_to.context solution (example here: http://appium.io/docs/en/writing-running-appium/web/hybrid/) but no solve so far.

Any updates anyone?

Hello @clarabez, Do you find any solution - I am facing same issue with setup - robotframework (python)and appium?

Hi @chiwhitesox56 i am facing same issue when we sign in then it redirecting to webview page. i use swtich context. as same as your code but sometimes its working and sometimes it is not. did you find the solution.