appium: Appium could not shows WEBVIEW but actually exists on an Android Native App

The problem

Appium could not shows/detects WEBVIEW but actually exists on an Android Native App. The main protractor script does not start execution.

Environment

  • Appium version (or git revision) that exhibits the issue: appium-desktop-Setup-1.0.0-beta.6
  • Last Appium version that did not exhibit the issue (if applicable):
  • Desktop OS/version used to run Appium: Win7
  • Node.js version (unless using Appium.app|exe): 4.4.4
  • Mobile platform/version under test: 7.0
  • Real device or emulator/simulator: Real device
  • Appium CLI or Appium.app|exe:

Details

[12:47:23] E/launcher - No such context found. [12:47:23] E/launcher - WebDriverError: No such context found. at WebDriverError (C:\Users\ic014162\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\error.js:27:5)

Link to Appium logs

[HTTP] <-- POST /wd/hub/session 500 48414 ms - 75 [HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“noReset”:true,“browserName”:“”,“platformName”:“android”,“platformVersion”:“7.0”,“deviceName”:“HT4AXJT03397”,“app”:“D:\InternalTesting\CloudData\android-armv7-release.apk”,“autoWebview”:true,“deviceReadyTimeout”:3000,“orientation”:“LANDSCAPE”,“autoWebviewTimeout”:10000,“count”:1}} [MJSONWP] Calling AppiumDriver.createSession() with args: [{“noReset”:true,“browserName”:“”,“platformName”:“android”,“platformVersion”:“7.0”,“deviceName”:“HT4AXJT03397”,“app”:“D:\InternalTesting\CloudData\android-armv7-release.apk”,“autoWebview”:true,“deviceReadyTimeout”:3000,“orientation”:“LANDSCAPE”,“autoWebviewTimeout”:10000,“count”:1},null,null,null,null] [BaseDriver] Event ‘newSessionRequested’ logged at 1492070254483 (13:27:34 GMT+0530 (India Standard Time)) [Appium] Creating new AndroidDriver (v1.17.1) session [Appium] Capabilities: [Appium] noReset: true [Appium] browserName: ‘’ [Appium] platformName: ‘android’ [Appium] platformVersion: ‘7.0’ [Appium] deviceName: ‘HT4AXJT03397’ [Appium] app: ‘D:\InternalTesting\CloudData\android-armv7-release.apk’ [Appium] autoWebview: true [Appium] deviceReadyTimeout: 3000 [Appium] orientation: ‘LANDSCAPE’ [Appium] autoWebviewTimeout: 10000 [Appium] count: 1 [AndroidDriver] AndroidDriver version: 1.17.1 [BaseDriver] The following capabilities were provided, but are not recognized by appium: count. [BaseDriver] Session created with session id: da4895b2-0565-4a3c-976e-14d42151bcd5 [AndroidDriver] Getting Java version [AndroidDriver] Java version is: 1.8.0_121 [ADB] Checking whether adb is present [ADB] Using adb.exe from C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe [AndroidDriver] Retrieving device list [ADB] Trying to find a connected android device [ADB] Getting connected devices… [ADB] 1 device(s) connected [AndroidDriver] Looking for a device with Android ‘7.0’ [ADB] Setting device id to HT4AXJT03397 [ADB] Getting device platform version [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“getprop”,“ro.build.version.release”] [AndroidDriver] Using device: HT4AXJT03397 [ADB] Checking whether adb is present [ADB] Using adb.exe from C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe [ADB] Setting device id to HT4AXJT03397 [BaseDriver] Using local app ‘D:\InternalTesting\CloudData\android-armv7-release.apk’ [AndroidDriver] Checking whether app is actually present [AndroidDriver] Starting Android session [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“wait-for-device”] [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“echo”,“ping”] [Logcat] Starting logcat capture [AndroidDriver] Pushing settings apk to device… [ADB] Getting install status for io.appium.settings [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“pm”,“list”,“packages”,“io.appium.settings”] [ADB] App is installed [ADB] Getting package info for io.appium.settings [ADB] Getting connected devices… [ADB] Checking whether aapt is present [ADB] Using aapt.exe from C:\Users\ic014162\AppData\Local\Android\sdk\build-tools\25.0.2\aapt.exe [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“dumpsys”,“package”,“io.appium.settings”] [ADB] Cannot read version codes of C:\Users\ic014162\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\io.appium.settings\app\build\outputs\apk\settings_apk-debug.apk and/or io.appium.settings. Assuming correct app version is already installed [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“getprop”,“ro.build.version.sdk”] [ADB] Device API level: 24 [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“dumpsys”,“package”,“io.appium.settings”] [AndroidDriver] Pushing unlock helper app to device… [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“install”,“C:\Users\ic014162\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-unlock\bin\unlock_apk-debug.apk”] [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“install”,“C:\Users\ic014162\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-unlock\bin\unlock_apk-debug.apk”] [ADB] Application ‘C:\Users\ic014162\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-unlock\bin\unlock_apk-debug.apk’ already installed. Continuing. [ADB] Device API level: 24 [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“appops”,“set”,“io.appium.settings”,“android:mock_location”,“allow”] [ADB] Getting device platform version [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“getprop”,“ro.build.version.release”] [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“wm”,“size”] [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“getprop”,“ro.product.model”] [ADB] Current device property ‘ro.product.model’: Nexus 9 [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“getprop”,“ro.product.manufacturer”] [ADB] Current device property ‘ro.product.manufacturer’: htc [AndroidDriver] Parsing package and activity from app manifest [ADB] Checking whether aapt is present [ADB] Using aapt.exe from C:\Users\ic014162\AppData\Local\Android\sdk\build-tools\25.0.2\aapt.exe [ADB] Extracting package and launch activity from manifest [ADB] badging package: com.siemens.bt.ra.mobile [ADB] badging act: com.siemens.bt.ra.mobile.MainActivity [AndroidDriver] Parsed package and activity are: com.siemens.bt.ra.mobile/com.siemens.bt.ra.mobile.MainActivity [AndroidDriver] Remote apk path is /data/local/tmp/1040152263b79a4e7980cbe596c55ca2.apk [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“ls”,“/data/local/tmp/1040152263b79a4e7980cbe596c55ca2.apk”] [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“ls”,“/data/local/tmp/1040152263b79a4e7980cbe596c55ca2.apk”] [AndroidDriver] Checking if app is installed [ADB] Getting install status for com.siemens.bt.ra.mobile [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“pm”,“list”,“packages”,“com.siemens.bt.ra.mobile”] [ADB] App is installed [AndroidDriver] Extracting strings from apk D:\InternalTesting\CloudData\android-armv7-release.apk undefined C:\Users\ic014162\AppData\Local\Temp\com.siemens.bt.ra.mobile [ADB] Extracting strings for language: default [ADB] Device API level: 24 [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“getprop”,“persist.sys.locale”] [ADB] Current device property ‘persist.sys.locale’: en-US [ADB] No strings.xml for language ‘en’, getting default strings.xml [ADB] Reading strings from converted strings.json [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“push”,“C:\Users\ic014162\AppData\Local\Temp\com.siemens.bt.ra.mobile\strings.json”,“/data/local/tmp”] [AndroidBootstrap] Watching for bootstrap disconnect [ADB] Forwarding system: 4724 to device: 4724 [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“forward”,“tcp:4724”,“tcp:4724”] [UiAutomator] Starting UiAutomator [UiAutomator] Moving to state ‘starting’ [UiAutomator] Parsing uiautomator jar [UiAutomator] Found jar name: ‘AppiumBootstrap.jar’ [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“push”,“C:\Users\ic014162\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-android-bootstrap\bootstrap\bin\AppiumBootstrap.jar”,“/data/local/tmp/”] [ADB] Attempting to kill all uiautomator processes [ADB] Getting all processes with uiautomator [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“ps”] [ADB] No uiautomator process found to kill, continuing… [UiAutomator] Starting UIAutomator [ADB] Creating ADB subprocess with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“uiautomator”,“runtest”,“AppiumBootstrap.jar”,“-c”,“io.appium.android.bootstrap.Bootstrap”,“-e”,“pkg”,“com.siemens.bt.ra.mobile”,“-e”,“disableAndroidWatchers”,false,“-e”,“acceptSslCerts”,false] [UiAutomator] Moving to state ‘online’ [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Loading json… [AndroidBootstrap] [BOOTSTRAP LOG] [debug] json loading complete. [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Registered crash watchers. [AndroidBootstrap] Android bootstrap socket is now connected [ADB] Getting connected devices… [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Client connected [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“dumpsys”,“window”] [AndroidDriver] Screen already unlocked, doing nothing [ADB] Device API level: 24 [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“am”,“start”,“-W”,“-n”,“com.siemens.bt.ra.mobile/com.siemens.bt.ra.mobile.MainActivity”,“-S”] [ADB] Waiting for pkg: ‘com.siemens.bt.ra.mobile’ and activity: ‘com.siemens.bt.ra.mobile.MainActivity’ to be focused [ADB] Possible activities, to be checked: com.siemens.bt.ra.mobile.MainActivity, com.siemens.bt.ra.mobile.com.siemens.bt.ra.mobile.MainActivity [ADB] Getting focused package and activity [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“dumpsys”,“window”,“windows”] [ADB] Found package: ‘com.siemens.bt.ra.mobile’ and fully qualified activity name : ‘com.siemens.bt.ra.mobile.MainActivity’ [AndroidDriver] Setting auto webview to context ‘WEBVIEW_com.siemens.bt.ra.mobile’ with timeout 10000ms [AndroidDriver] Getting a list of available webviews [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“cat”,“/proc/net/unix”] [AndroidDriver] Found webviews: [] [AndroidDriver] Available contexts: [“NATIVE_APP”] [AndroidDriver] Getting a list of available webviews [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“cat”,“/proc/net/unix”] [AndroidDriver] Found webviews: [] [AndroidDriver] Available contexts: [“NATIVE_APP”] [AndroidDriver] Getting a list of available webviews [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“cat”,“/proc/net/unix”] [AndroidDriver] Found webviews: [] [AndroidDriver] Available contexts: [“NATIVE_APP”] [AndroidDriver] Getting a list of available webviews [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“cat”,“/proc/net/unix”] [AndroidDriver] Found webviews: [] [AndroidDriver] Available contexts: [“NATIVE_APP”] [AndroidDriver] Getting a list of available webviews [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“cat”,“/proc/net/unix”] [AndroidDriver] Found webviews: [] [AndroidDriver] Available contexts: [“NATIVE_APP”] [AndroidDriver] Getting a list of available webviews [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“cat”,“/proc/net/unix”] [AndroidDriver] Found webviews: [] [AndroidDriver] Available contexts: [“NATIVE_APP”] [AndroidDriver] Getting a list of available webviews [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“cat”,“/proc/net/unix”] [AndroidDriver] Found webviews: [] [AndroidDriver] Available contexts: [“NATIVE_APP”] [AndroidDriver] Getting a list of available webviews [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“cat”,“/proc/net/unix”] [AndroidDriver] Found webviews: [] [AndroidDriver] Available contexts: [“NATIVE_APP”] [AndroidDriver] Getting a list of available webviews [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“cat”,“/proc/net/unix”] [AndroidDriver] Found webviews: [] [AndroidDriver] Available contexts: [“NATIVE_APP”] [AndroidDriver] Getting a list of available webviews [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“cat”,“/proc/net/unix”] [AndroidDriver] Found webviews: [] [AndroidDriver] Available contexts: [“NATIVE_APP”] [AndroidDriver] Getting a list of available webviews [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“cat”,“/proc/net/unix”] [AndroidDriver] Found webviews: [] [AndroidDriver] Available contexts: [“NATIVE_APP”] [AndroidDriver] Getting a list of available webviews [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“cat”,“/proc/net/unix”] [AndroidDriver] Found webviews: [] [AndroidDriver] Available contexts: [“NATIVE_APP”] [AndroidDriver] Shutting down Android driver [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“am”,“force-stop”,“com.siemens.bt.ra.mobile”] [ADB] Pressing the HOME button [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“input”,“keyevent”,3] [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] Received command result from bootstrap [UiAutomator] Shutting down UiAutomator [UiAutomator] Moving to state ‘stopping’ [UiAutomator] UiAutomator shut down normally [UiAutomator] Moving to state ‘stopped’ [ADB] Attempting to kill all uiautomator processes [ADB] Getting all processes with uiautomator [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“ps”] [ADB] No uiautomator process found to kill, continuing… [UiAutomator] Moving to state ‘stopped’ [Logcat] Stopping logcat capture [ADB] Getting connected devices… [ADB] 1 device(s) connected [ADB] Running ‘C:\Users\ic014162\AppData\Local\Android\sdk\platform-tools\adb.exe’ with args: [“-P”,5037,“-s”,“HT4AXJT03397”,“shell”,“am”,“force-stop”,“io.appium.unlock”] [AndroidDriver] Not cleaning generated files. Add clearSystemFiles capability if wanted. [HTTP] <-- POST /wd/hub/session 500 21472 ms - 75

## Code To Reproduce Issue [ Good To Have ] exports.config = { seleniumAddress: ‘http://localhost:4723/wd/hub’, specs: [‘appSpec.js’], rootElement: [‘ng-app’],

capabilities:{ noReset: true, browserName: ‘’, platformName: ‘android’, platformVersion: ‘7.0’, deviceName: ‘HT4AXJT03397’, app: ‘…\android-armv7-release.apk’, autoWebview: true, deviceReadyTimeout: 3000, orientation: ‘LANDSCAPE’, }, baseUrl: ‘http://localhost:8100’,

onPrepare: function(){ var wd = require(‘wd’), protractor = require(‘protractor’), wdBridge = require(‘wd-bridge’)(protractor,wd); wdBridge.initFromProtractor(exports.config); } };

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 24 (1 by maintainers)

Most upvoted comments

@obstar Try setting the autoWebview desired capability to true.

@ruchika77 Hi! I faced the same problemю I was inattentive and I tried to run tests for not-debug version. After install debug version of the app everything becomes ok. Maybe it will help somebody)

I’m using the simulator that’s part of the Android SDK.

Simulator works fine on 7.1.1 Real device doesn’t work - test 7.1.1/7.0/6.0

sorry guys that was my bad. after setting WebView.setWebContentsDebuggingEnabled(true); oncreate method it worked

i enabled WebView.setWebContentsDebuggingEnabled(true); and the code i use is like below. Please let me know if there is a missing part

DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("deviceName", "00a9f1b08d7e58a3"); capabilities.setCapability("CapabilityType.BROWSER_NAME", "Android"); capabilities.setCapability("CapabilityType.VERSION", "5.0.2"); capabilities.setCapability("platformName", "Android"); capabilities.setCapability("app", "xxx.apk"); capabilities.setCapability("appPackage", "xxxxx.dev"); capabilities.setCapability("appActivity", "xxxxxxx.SplashActivity"); driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);

Set<String> contextHandles = driver.getContextHandles(); for (String s : contextHandles) { System.out.println("Context : " + s); if (s.contains("WEBVIEW")) { driver.context(s);

@okanerdogan84

Set the following in the onCreate method of your app

WebView.setWebContentsDebuggingEnabled(true);

Then make sure that you set your driver context to the webview in your test.