appium: Appium 1.6.6-beta.4 IOS Safari real device not able to navigate into any URL
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 {}**
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (5 by maintainers)
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.