Friday, August 14, 2026
HomeiOS DevelopmentCan not discover WebViewContext for WkWebView on iOS Simulator with Appium

Can not discover WebViewContext for WkWebView on iOS Simulator with Appium

[ad_1]

I at present don’t have any entry to the WKWebView by way of Appium. I begin the motive force with the next capabilities:

var choices = new AppiumOptions();
choices.AddAdditionalCapability("automationName", "XCUITest");
choices.AddAdditionalCapability("platformName", "iOS");
choices.AddAdditionalCapability("platformVersion", "15.5");
choices.AddAdditionalCapability("deviceName", "iPad (fifth technology)");
choices.AddAdditionalCapability("language", "DE");
choices.AddAdditionalCapability("app", "/Customers/testautomatisierung/Tasks/TestAppWebView/TestAppWebView/bin/iPhoneSimulator/Debug/device-builds/ipad6.4-15.5/TestAppWebView.app");
choices.AddAdditionalCapability("derivedDataPath", "/Customers/testautomatisierung/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu");
choices.AddAdditionalCapability("webviewConnectTimeout", "90000");
choices.AddAdditionalCapability("safariLogAllCommunication", "true");

My Appium Server Logs inform me:

[debug] [RemoteDebugger] Discovered app id key 'PID:6483' for bundle 'com.apple.WebKit.WebContent'
[debug] [RemoteDebugger] Discovered app id key 'PID:6483' for bundle 'process-com.apple.WebKit.WebContent'
[debug] [RemoteDebugger] Discovered app id key 'PID:6483' for bundle 'process-SafariViewService'
[debug] [RemoteDebugger] Discovered app id key 'PID:6483' for bundle 'com.apple.SafariViewService'
[debug] [RemoteDebugger] Discovered app id key 'PID:6483' for bundle '*'
[debug] [RemoteDebugger] Discovered app id key 'PID:6483' for bundle 'de.TestAppWebView'
[debug] [RemoteDebugger] Making an attempt out the attainable app ids: PID:6483 (attempt #1 of 20)
[debug] [RemoteDebugger] Trying app 'PID:6483'
[debug] [RemoteDebugger] Sending '_rpc_forwardGetListing:' message to app 'PID:6483' (id: 42): 'connectToApp'
[debug] [ios-device] Sending message to Internet Inspector:
[debug] [ios-device] {
[debug] [ios-device]   "__argument": {
[debug] [ios-device]     "WIRConnectionIdentifierKey": "470505be-7934-41cd-881e-d2e390be4ffd",
[debug] [ios-device]     "WIRApplicationIdentifierKey": "PID:6483"
[debug] [ios-device]   },
[debug] [ios-device]   "__selector": "_rpc_forwardGetListing:"
[debug] [ios-device] }
[debug] [ios-device] Obtained message from Internet Inspector:
[debug] [ios-device] {
[debug] [ios-device]   "__argument": {
[debug] [ios-device]     "WIRApplicationIdentifierKey": "PID:6483",
[debug] [ios-device]     "WIRListingKey": {}
[debug] [ios-device]   },
[debug] [ios-device]   "__selector": "_rpc_applicationSentListing:"
[debug] [ios-device] }
[debug] [RemoteDebugger] Obtained response from ship (id: 42): '["PID:6483",{}]'
[debug] [RemoteDebugger] Sending to Internet Inspector took 2ms
[debug] [RemoteDebugger] Empty web page dictionary obtained
[debug] [RemoteDebugger] Error checking software: 'Empty web page dictionary obtained'. Retrying connection
[RemoteDebugger] Couldn't hook up with a sound app after 20 tries.
[debug] [XCUITest] No obtainable internet pages: Couldn't hook up with a sound app after 20 tries.
[debug] [XCUITest] No internet frames discovered.
[debug] [W3C (4114d2e3)] Responding to consumer with driver.getContexts() consequence: ["NATIVE_APP"]

In Safari i allow the event modus and that i can discover my WebAppView on the simulator. Can somebody assist me? Thanks

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments