appium: Unable to find WEBVIEW in an hybrid app possibly due to ios-webkit-debug-proxy
Hey guys,
Im trying to find WEBVIEW in an hybrid app but all I
m getting back is NATIVE_APP. Here`s my setup:
- xcode 10.2
- ios 10.1
- appium 1.6.3
'TestCase: @Before public void setup() {
try {
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.APPIUM_VERSION, "1.6.3");
capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, "XCUITest");
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone 6");
capabilities.setCapability(MobileCapabilityType.UDID, "456af3fa1a0b67bc8f587ef5de70474dd8fc132");
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "iOS");
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "10.1");
capabilities.setCapability("bundleId", "com.example");
// capabilities.setCapability(MobileCapabilityType.APP_ACTIVITY, "com.example.MainActivity");
capabilities.setCapability("autoWebview", "true");
driver = new IOSDriver<WebElement>(new URL("http://0.0.0.0:4723/wd/hub"), capabilities);
} catch (MalformedURLException e) {
e.printStackTrace();
}
}`
[debug] [MJSONWP] Calling AppiumDriver.getContexts() with args: ["3e48975f-b789-45ca-b529-06475ed400b5"] [debug] [XCUITest] Executing command 'getContexts' [debug] [iOS] Getting list of available contexts [debug] [iOS] Retrieving contexts and views [debug] [iOS] Selecting by url: false [debug] [RemoteDebugger] Getting WebKitRemoteDebugger pageArray: localhost, 27753 [debug] [RemoteDebugger] Sending request to: http://localhost:27753/json [iOS] Attempted to get a list of webview contexts but could not connect to ios-webkit-debug-proxy. If you expect to find webviews, please ensure that the proxy is running and accessible [debug] [iOS] No web frames found. [debug] [MJSONWP] Responding to client with driver.getContexts() result: ["NATIVE_APP"]
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 18 (5 by maintainers)
Hi @KBhatti @imurchie I am facing similar issue on Real Device
“I am trying to switch to webview(not in Safari but within the app itself) to test but it is not working. I printed out the context on console so it alteast prints out the webview context name, but it doesn’t recognize web view, it is only returning NATIVEVIEW”
Tried Manual proxy
And when I try to launch safari go to any random website, url http://localhost:27753/json shows response [{ “devtoolsFrontendUrl”: “/devtools/devtools.html?ws=localhost:27753/devtools/page/1”, “faviconUrl”: “”, “thumbnailUrl”: “/thumb/xyz/”, “title”: “xyzzy”, “url”: “xyzzy”, “webSocketDebuggerUrl”: “ws://localhost:27753/devtools/page/1”, “appId”: “PID:xyz” }]
Do we have any solution? If yes please help
Created support ticket for more details https://discuss.appium.io/t/unable-to-find-webview-in-ios-hybrid-app-xcode9-appium1-7-1/19046