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.

Appium 1.6.6-beta.4 IOS Safari real device not able to navigate into any URL

See original GitHub issue

The problem

Xcode 9.0 beta.6, Appium 1.6.6-beta.4 able to build WDA and install into device and then when tries to run the test not able to navigate into any URL, application is Hybrid and Its picking only Native view and in the capabilities not setting any context

       var remoteAddress = new Uri(FrameworkTestContext.Configuration.SeleniumGrid);
        var capabilities = new DesiredCapabilities();
        capabilities.SetCapability(CapabilityType.BrowserName, "Safari");
        capabilities.SetCapability("automationName", "XCUITest");
        capabilities.SetCapability(MobileCapabilityType.DeviceName, "Matthew's iPhone");
        capabilities.SetCapability(MobileCapabilityType.PlatformName, "iOS");
        capabilities.SetCapability("realDeviceLogger", "/usr/local/lib/node_modules/deviceconsole/deviceconsole");
        capabilities.SetCapability("safariAllowPopups", false);
        capabilities.SetCapability("startIWDP", "true");
        capabilities.SetCapability("autoWebview", "true");

        Driver = new IOSDriver<IWebElement>(remoteAddress, capabilities);

Environment

  • Appium version 1.6.6-beta.4
  • Mobile platform/version under test: IOS Safari Real device
  • Real device or emulator/simulator: Real device

Link to Appium logs

derivcomacmini4:~ derivcomacmini4$ cd /usr/local/lib/node_modules && node appium -a 10.203.49.94 -p 4491 --bootstrap-port 4491 -U 4625d558cb0644ea3447352bdfd3d0db2451167c --nodeconfig /Users/admin/Automation/Nodes/Node_Safari.json --webkit-debug-proxy-port 27753 --webdriveragent-port 8100 --safari --tmp /tmp2/ios/
[Appium] Welcome to Appium v1.6.6-beta.4
[Appium] Non-default server args:
[Appium]   address: 10.203.49.94
[Appium]   port: 4491
[Appium]   bootstrapPort: 4491
[Appium]   safari: true
[Appium]   nodeconfig: /Users/admin/Automation/Nodes/Node_Safari.json
[Appium]   tmpDir: /tmp2/ios/
[Appium]   udid: 4625d558cb0644ea3447352bdfd3d0db2451167c
[Appium] Deprecated server args:
[Appium]   -U,--udid => --default-capabilities '{"udid":"4625d558cb0644ea3447352bdfd3d0db2451167c"}'
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
[Appium]   udid: '4625d558cb0644ea3447352bdfd3d0db2451167c'
[debug] [Appium] Starting auto register thread for grid. Will try to register every 5000 ms.
[Appium] Appium REST http interface listener started on 10.203.49.94:4491
[debug] [Appium] Appium successfully registered with the grid on 10.203.49.94:3399
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[debug] [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.6.6-beta.4","revision":null}}
[HTTP] <-- GET /wd/hub/status 200 49 ms - 90 
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[debug] [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.6.6-beta.4","revision":null}}
[HTTP] <-- GET /wd/hub/status 200 20 ms - 90 
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[debug] [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.6.6-beta.4","revision":null}}
[HTTP] <-- GET /wd/hub/status 200 19 ms - 90 
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[debug] [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.6.6-beta.4","revision":null}}
[HTTP] <-- GET /wd/hub/status 200 24 ms - 90 
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[debug] [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.6.6-beta.4","revision":null}}
[HTTP] <-- GET /wd/hub/status 200 25 ms - 90 
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[debug] [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.6.6-beta.4","revision":null}}
[HTTP] <-- GET /wd/hub/status 200 27 ms - 90 
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"buldleId":"none","realDeviceLogger":"/usr/local/lib/node_modules/deviceconsole/deviceconsole","safariAllowPopups":false,"automationName":"XCUITest","browserName":"Safari","platformName":"iOS","startIWDP":"true","deviceName":"Matthew's iPhone"}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"buldleId":"none","realDeviceLogger":"/usr/local/lib/node_modules/deviceconsole/deviceconsole","safariAllowPopups":false,"automationName":"XCUITest","browserName":"Safari","platformName":"iOS","startIWDP":"true","deviceName":"Matthew's iPhone"},null,null]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1504542834408 (17:33:54 GMT+0100 (BST))
[Appium] Creating new XCUITestDriver (v2.47.0) session
[Appium] Capabilities:
[Appium]   buldleId: 'none'
[Appium]   realDeviceLogger: '/usr/local/lib/node_modules/deviceconsole/deviceconsole'
[Appium]   safariAllowPopups: false
[Appium]   automationName: 'XCUITest'
[Appium]   browserName: 'Safari'
[Appium]   platformName: 'iOS'
[Appium]   startIWDP: 'true'

[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[debug] [RemoteDebugger] Page element JSON: [{"devtoolsFrontendUrl":"/devtools/devtools.html?ws=localhost:27753/devtools/page/1","faviconUrl":"","thumbnailUrl":"/thumb/http://appium.io/","title":"Appium: Mobile App Automation Made Awesome.","url":"http://appium.io/","webSocketDebuggerUrl":"ws://localhost:27753/devtools/page/1","appId":"PID:269"}]
[debug] [iOS] Retrieving contexts and views
[debug] [iOS] Selecting by url: true (expected url: 'http://appium.io')
[debug] [RemoteDebugger] Getting WebKitRemoteDebugger pageArray: localhost, 27753
[debug] [RemoteDebugger] Sending request to: http://localhost:27753/json
[debug] [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.6.6-beta.4","revision":null}}
[HTTP] <-- GET /wd/hub/status 200 69 ms - 90 
[debug] [RemoteDebugger] Page element JSON: [{"devtoolsFrontendUrl":"/devtools/devtools.html?ws=localhost:27753/devtools/page/1","faviconUrl":"","thumbnailUrl":"/thumb/http://appium.io/","title":"Appium: Mobile App Automation Made Awesome.","url":"http://appium.io/","webSocketDebuggerUrl":"ws://localhost:27753/devtools/page/1","appId":"PID:269"}]
# [debug] [iOS] Picking webview 'NATIVE_APP'
[debug] [iOS] Attempting to set context to 'NATIVE_APP'
[debug] [RemoteDebugger] Unregistering from page readiness notifications
[debug] [BaseDriver] Event 'initialWebviewNavigated' logged at 1504542875536 (17:34:35 GMT+0100 (BST))
[Appium] New XCUITestDriver session created successfully, session 820f75d2-7517-4207-b991-4e1c3fd4de51 added to master session list
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1504542875543 (17:34:35 GMT+0100 (BST))
[debug] [MJSONWP] Responding to client with driver.createSession() result: {"webStorageEnabled":false,"locationContextEnabled":false,"browserName":"Safari","platform":"MAC","javascriptEnabled":true,"databaseEnabled":false,"takesScreenshot":true,"networkConnectionEnabled":false,"buldleId":"none","realDeviceLogger":"/usr/local/lib/node_modules/deviceconsole/deviceconsole","safariAllowPopups":false,"automationName":"XCUITest","platformName":"iOS","startIWDP":"true","deviceName":"Matthew's iPhone","udid":"4625d558cb0644ea3447352bdfd3d0db2451167c"}
[HTTP] <-- POST /wd/hub/session 200 41140 ms - 546 
[HTTP] --> GET /wd/hub/session/820f75d2-7517-4207-b991-4e1c3fd4de51/orientation {}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[debug] [XCUITest] Executing command 'proxyReqRes'
[debug] [JSONWP Proxy] Proxying [GET /wd/hub/session/820f75d2-7517-4207-b991-4e1c3fd4de51/orientation] to [GET http://localhost:8100/session/3E8E38A0-8E71-4CCF-94EC-14A04912FB3C/orientation] with body: {}
[debug] [JSONWP Proxy] Got response with status 200: "{\n  \"value\" : \"PORTRAIT\",\n  \"sessionId\" : \"3E8E38A0-8E71-4CCF-94EC-14A04912FB3C\",\n  \"status\" : 0\n}"
[JSONWP Proxy] Replacing sessionId 3E8E38A0-8E71-4CCF-94EC-14A04912FB3C with 820f75d2-7517-4207-b991-4e1c3fd4de51
[HTTP] <-- GET /wd/hub/session/820f75d2-7517-4207-b991-4e1c3fd4de51/orientation 200 288 ms - 82 
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[debug] [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.6.6-beta.4","revision":null}}
[**# HTTP] <-- GET /wd/hub/status 200 120 ms - 90 
[HTTP] --> POST /wd/hub/session/820f75d2-7517-4207-b991-4e1c3fd4de51/url {"url":"https://m-uat-tc2.spinsport.ludologic.com/mobile_betway_com/en/sports?clienttypeid=1"}
[debug] [MJSONWP] Calling AppiumDriver.setUrl() with args: ["https://m-uat-tc2.spinsport.ludologic.com/mobile_betway_com/en/sports?clienttypeid=1","820f75d2-7517-4207-b991-4e1c3fd4de51"]
[debug] [XCUITest] Executing command 'setUrl'
[debug] [JSONWP Proxy] Proxying [POST /url] to [POST http://localhost:8100/session/3E8E38A0-8E71-4CCF-94EC-14A04912FB3C/url] with body: {"url":"https://m-uat-tc2.spinsport.ludologic.com/mobile_betway_com/en/sports?clienttypeid=1"}
[debug] [JSONWP Proxy] Got response with status 200: {"value":"Failed to open https://m-uat-tc2.spinsport.ludologic.com/mobile_betway_com/en/sports?clienttypeid=1","sessionId":"3E8E38A0-8E71-4CCF-94EC-14A04912FB3C","status":13}
[HTTP] <-- POST /wd/hub/session/820f75d2-7517-4207-b991-4e1c3fd4de51/url 500 117 ms - 270 
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[debug] [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.6.6-beta.4","revision":null}}
[HTTP] <-- GET /wd/hub/status 200 24 ms - 90 
[HTTP] --> GET /wd/hub/status {}**

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
imurchiecommented, Sep 12, 2017

This should be fixed in appium-xcuitest-driver@2.47.2. Unfortunately another “fix” accidentally sent everything to the native context when setting the url.

0reactions
lock[bot]commented, Nov 1, 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 Navigate web app on safari on real iPhone device
If I try with simulator than its working perfectly, but my requirement on real iPhone device. Environment:- Appium v1.8.1. Mac OS 10.13.6. Xcode ......
Read more >
SafariLauncher navigates to apple.com instead of specified URL
Hi, I am not able to run TestScripts on safari browser on iOS devices[iOS 8]. Appium version: 1.3.1 Xcode: xcode 6.0 iOS SDK:...
Read more >
Unable to run appium on Safari browser on Real Devices
Hi All, I am looking for support to run the appium on safari browser on real iPhone. I have followed the appium documentation...
Read more >
Mobile Web automation on iOS real device – Safari
Hi all, Am planning to use Appium to test my application in mobile. · Unable to launch safari browser even in Simulator: error:...
Read more >
appium/CHANGELOG.md - UNPKG
The CDN for appium. ... Remove `WebDriverAgentRunner` application from any real device being tested. ... 421, CHANGES IN VERSION 1.6.6-beta.4 (from 1.6.5).
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