question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to find WEBVIEW in an hybrid app possibly due to ios-webkit-debug-proxy

See original GitHub issue

Hey guys, Im trying to find WEBVIEW in an hybrid app but all Im 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"]

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:18 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
masoodmd0786commented, Oct 5, 2017

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

  1. launch iOS-webKit-proxy: ios_webkit_debug_proxy -c myDeviceUDID:27753 -d
  2. In App Navigate to the webContent page (it opens within the App not in safari)
  3. Open url http://localhost:27753/json
  4. Empty response - {}

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

0reactions
lock[bot]commented, Apr 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to find WEBVIEW in an hybrid app ... - Appium Discuss
I m trying to find WEBVIEW in an hybrid app but all I m getting back is NATIVE_APP. Here`s my setup: xcode 10.2;...
Read more >
Unable to switch to WebView context on iOS Appium test ...
The ios-webkit-debug-proxy is automatically launched on device farm. We are currently in the process of deploying support for Hybrid apps ...
Read more >
Automating Hybrid Applications with Appium - YouTube
When creating a mobile application, organisations have a few options to choose from; mobile web, native or a hybrid application.
Read more >
Automating hybrid apps - Appium
Here are the steps required to talk to a web view in your Appium test: Navigate to a portion of your app where...
Read more >
Understanding WebViews - KIRUPA
WebViews allow you to display web content inside a native app, but they hide more tricks than just that. Find out what those...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found