[XCUITest] No available web pages: Could not connect to a valid app after 20 tries. [debug] [XCUITest] No web frames found
See original GitHub issueThe problem
[debug] [XCUITest] No available web pages: Could not connect to a valid app after 20 tries. [debug] [XCUITest] No web frames found
Environment
- Appium version (or git revision) that exhibits the issue:1.17.0
- Last Appium version that did not exhibit the issue (if applicable):
- Desktop OS/version used to run Appium: MAC 10.14.5
- Node.js version (unless using Appium.app|exe):
- Npm or Yarn package manager:6.9.0
- Mobile platform/version under test:12.4
- Real device or emulator/simulator: Real Device
- Appium CLI or Appium.app|exe: CLI
ios_webkit_debug_proxy 1.8.6 Built with libimobiledevice v1.2.1, libplist v2.1.0
Details
- Launch app successfully
- Click on Login in link [Native_App] [able to interact with native_app provision profile is ok]
- Login page display [WebView]
- Unable to getContext for WebView - getting o/p No Web frame found
Link to Appium logs
[debug] [RemoteDebugger] Checking for bundle identifiers: process-SafariViewService, com.apple.SafariViewService, *, com.xxxxxx.xxxxxxxxx.xxxxxxxx
[debug] [RemoteDebugger] Found app id key 'PID:306' for bundle 'process-SafariViewService'
[debug] [RemoteDebugger] Found app id key 'PID:306' for bundle 'com.apple.SafariViewService'
[debug] [RemoteDebugger] Found app id key 'PID:306' for bundle '*'
[debug] [RemoteDebugger] Found app id key 'PID:306' for bundle 'com.mobileApp.myaccount.enterprise'
[debug] [RemoteDebugger] Trying out the possible app ids: PID:306 (try #1 of 20)
[debug] [RemoteDebugger] Skipping app 'PID:306' because it is not active
[debug] [RemoteDebugger] Current applications available:
[debug] [RemoteDebugger] Application: 'PID:306'
[debug] [RemoteDebugger] id: "PID:306"
[debug] [RemoteDebugger] isProxy: true
[debug] [RemoteDebugger] name: "com.apple.WebKit.WebContent"
[debug] [RemoteDebugger] bundleId: "com.apple.WebKit.WebContent"
[debug] [RemoteDebugger] hostId: "PID:302"
[debug] [RemoteDebugger] isActive: 0
[debug] [RemoteDebugger] isAutomationEnabled: false
[debug] [RemoteDebugger] Application: 'PID:302'
[debug] [RemoteDebugger] id: "PID:302"
[debug] [RemoteDebugger] isProxy: false
[debug] [RemoteDebugger] name: "Safari"
[debug] [RemoteDebugger] bundleId: "com.apple.mobilesafari"
[debug] [RemoteDebugger] hostId: undefined
[debug] [RemoteDebugger] isActive: 0
[debug] [RemoteDebugger] isAutomationEnabled: false
[debug] [RemoteDebugger] Application: 'PID:303'
[debug] [RemoteDebugger] id: "PID:303"
[debug] [RemoteDebugger] isProxy: true
[debug] [RemoteDebugger] name: "com.apple.WebKit.WebContent"
[debug] [RemoteDebugger] bundleId: "com.apple.WebKit.WebContent"
[debug] [RemoteDebugger] hostId: "PID:302"
[debug] [RemoteDebugger] isActive: 0
[debug] [RemoteDebugger] isAutomationEnabled: false
[debug] [RemoteDebugger] Checking for bundle identifiers: process-SafariViewService, com.apple.SafariViewService, *, com.xxxxxxx.xxxxxxx.xxxxxxx
[debug] [RemoteDebugger] Found app id key 'PID:306' for bundle 'process-SafariViewService'
[debug] [RemoteDebugger] Found app id key 'PID:306' for bundle 'com.apple.SafariViewService'
[debug] [RemoteDebugger] Found app id key 'PID:306' for bundle '*'
[debug] [RemoteDebugger] Found app id key 'PID:306' for bundle 'com.xxxxxxx.xxxxx.xxxxxx'
[debug] [RemoteDebugger] Trying out the possible app ids: PID:306 (try #1 of 20)
[debug] [RemoteDebugger] Skipping app 'PID:306' because it is not active
[RemoteDebugger] Could not connect to a valid app after 20 tries.
**[debug] [XCUITest] No available web pages: Could not connect to a valid app after 20 tries.
[debug] [XCUITest] No web frames found.**
[debug] [W3C (e54a2231)] Responding to client with driver.getContexts() result: ["NATIVE_APP"]
Code To Reproduce Issue [ Good To Have ]
desiredCapabilities.setCapability("platformName", "iOS"); desiredCapabilities.setCapability("automationName","XCUITest");
desiredCapabilities.setCapability("deviceName", globalProp.getProperty("iosDeviceName"));
desiredCapabilities.setCapability("udid", globalProp.getProperty("udid"));
desiredCapabilities.setCapability("xcodeOrgId", globalProp.getProperty("xcodeOrgId"));
desiredCapabilities.setCapability("xcodeSigningId", globalProp.getProperty("xcodeSigningId")); desiredCapabilities.setCapability("locale",globalProp.getProperty("language").toLowerCase().toLowerCase()+"_CA");
Issue Analytics
- State:
- Created 4 years ago
- Comments:20 (5 by maintainers)
Top Results From Across the Web
Cannot find WebViewContext for WkWebView on iOS ...
[debug] [XCUITest] No available web pages: Could not connect to a valid app after 20 tries. [debug] [XCUITest] No web frames found.
Read more >XCTest - UITest "Could not obtain the bundle identifier for"
Everytime I try to run the Test Xcode tells me "Could not obtain the bundle identifier for /path/to/myRepo/build/Debug-iphoneos/My_App.app" and it fails.
Read more >Unable to find WEBVIEW in an hybrid app possibly due to ios ...
Hey guys, Im trying to find WEBVIEW in an hybrid app but all Im ... the proxy is running and accessible [debug] [iOS]...
Read more >appium-xcuitest-driver - npm
If it is not possible to connect to your web view(s) using Safari remote debugger then XCUITest won't be able to connect to...
Read more >Appium-xcuitest-driver - npm.io
If it is not possible to connect to your web view(s) using Safari remote debugger then XCUITest won't be able to connect to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Unfortunately no sucess @imurchie
[HTTP] NATIVE_APP 47624########### Poll For Context ############### [HTTP] --> GET /wd/hub/session/895665a1-a24a-4fa8-9b05-51663f7cc14a/contexts [HTTP] {} [debug] [W3C (895665a1)] Calling AppiumDriver.getContexts() with args: [“895665a1-a24a-4fa8-9b05-51663f7cc14a”] [debug] [XCUITest] Executing command ‘getContexts’ [debug] [XCUITest] Getting list of available contexts [debug] [iOS] Retrieving contexts and views [debug] [XCUITest] Selecting by url: false [debug] [RemoteDebugger] Sending connection key request [debug] [RemoteDebugger] Sending ‘_rpc_reportIdentifier:’ message (id: 48): ‘setConnectionKey’ [debug] [ios-device] Sending message to Web Inspector: [debug] [ios-device] { [debug] [ios-device] “__argument”: { [debug] [ios-device] “WIRConnectionIdentifierKey”: “fd42963a-64b5-4b97-92e0-4c736f0f388a” [debug] [ios-device] }, [debug] [ios-device] “__selector”: “_rpc_reportIdentifier:” [debug] [ios-device] } [debug] [RemoteDebugger] Sending to Web Inspector took 1ms [debug] [RemoteDebugger] Selecting application [debug] [RemoteDebugger] No applications currently connected. [debug] [XCUITest] No web frames found. [debug] [W3C (895665a1)] Responding to client with driver.getContexts() result: [“NATIVE_APP”] [HTTP] <-- GET /wd/hub/session/895665a1-a24a-4fa8-9b05-51663f7cc14a/contexts 200 4 ms - 24 [HTTP] NATIVE_APP 48636########### Poll For Context ############### [HTTP] --> GET /wd/hub/session/895665a1-a24a-4fa8-9b05-51663f7cc14a/contexts [HTTP] {} [debug] [W3C (895665a1)] Calling AppiumDriver.getContexts() with args: [“895665a1-a24a-4fa8-9b05-51663f7cc14a”] [debug] [XCUITest] Executing command ‘getContexts’ [debug] [XCUITest] Getting list of available contexts [debug] [iOS] Retrieving contexts and views [debug] [XCUITest] Selecting by url: false [debug] [RemoteDebugger] Sending connection key request [debug] [RemoteDebugger] Sending ‘_rpc_reportIdentifier:’ message (id: 49): ‘setConnectionKey’ [debug] [ios-device] Sending message to Web Inspector: [debug] [ios-device] { [debug] [ios-device] “__argument”: { [debug] [ios-device] “WIRConnectionIdentifierKey”: “fd42963a-64b5-4b97-92e0-4c736f0f388a” [debug] [ios-device] }, [debug] [ios-device] “__selector”: “_rpc_reportIdentifier:” [debug] [ios-device] } [debug] [RemoteDebugger] Sending to Web Inspector took 2ms [debug] [RemoteDebugger] Selecting application [debug] [RemoteDebugger] No applications currently connected. [debug] [XCUITest] No web frames found. [debug] [W3C (895665a1)] Responding to client with driver.getContexts() result: [“NATIVE_APP”] [HTTP] <-- GET /wd/hub/session/895665a1-a24a-4fa8-9b05-51663f7cc14a/contexts 200 5 ms - 24 [HTTP] NATIVE_APP 49645########### Poll For Context ############### [HTTP] --> GET /wd/hub/session/895665a1-a24a-4fa8-9b05-51663f7cc14a/contexts [HTTP] {} [debug] [W3C (895665a1)] Calling AppiumDriver.getContexts() with args: [“895665a1-a24a-4fa8-9b05-51663f7cc14a”] [debug] [XCUITest] Executing command ‘getContexts’ [debug] [XCUITest] Getting list of available contexts [debug] [iOS] Retrieving contexts and views [debug] [XCUITest] Selecting by url: false [debug] [RemoteDebugger] Sending connection key request [debug] [RemoteDebugger] Sending ‘_rpc_reportIdentifier:’ message (id: 50): ‘setConnectionKey’ [debug] [ios-device] Sending message to Web Inspector: [debug] [ios-device] { [debug] [ios-device] “__argument”: { [debug] [ios-device] “WIRConnectionIdentifierKey”: “fd42963a-64b5-4b97-92e0-4c736f0f388a” [debug] [ios-device] }, [debug] [ios-device] “__selector”: “_rpc_reportIdentifier:” [debug] [ios-device] } [debug] [RemoteDebugger] Sending to Web Inspector took 1ms [debug] [RemoteDebugger] Selecting application [debug] [RemoteDebugger] No applications currently connected. [debug] [XCUITest] No web frames found. [debug] [W3C (895665a1)] Responding to client with driver.getContexts() result: [“NATIVE_APP”] [HTTP] <-- GET /wd/hub/session/895665a1-a24a-4fa8-9b05-51663f7cc14a/contexts 200 4 ms - 24 [HTTP] NATIVE_APP [HTTP] --> GET /wd/hub/session/895665a1-a24a-4fa8-9b05-51663f7cc14a/contexts [HTTP] {}