Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot get the expected current_url & title after switch multiple webviews on iOS #73

Open
xinxinga opened this issue May 17, 2019 · 1 comment
Assignees

Comments

@xinxinga
Copy link

When I try to switch multiple webviews and get the self.driver.title, OR self.driver.current_url, it always got the latest view's info.

http://localhost:9222/json
[{
"devtoolsFrontendUrl": "/devtools/devtools.html?ws=localhost:9222/devtools/page/1",
"faviconUrl": "",
"thumbnailUrl": "/thumb/",
"title": "JSContext",
"url": "",
"webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/1",
"appId": "PID:11418"
},{
"devtoolsFrontendUrl": "/devtools/devtools.html?ws=localhost:9222/devtools/page/2",
"faviconUrl": "",
"thumbnailUrl": "/thumb/https://www.XXX.com/AAA",
"title": "AAA",
"url": "/https://www.XXX.com/AAA",
"webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/2",
"appId": "PID:11420"
},{
"devtoolsFrontendUrl": "",
"faviconUrl": "",
"thumbnailUrl": "/thumb/https://www.XXX.com/BBB",
"title": "BBB",
"url": "/https://www.XXX.com/BBB",
"webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/3",
"appId": "PID:11424"
},{
"devtoolsFrontendUrl": "/devtools/devtools.html?ws=localhost:9222/devtools/page/4",
"faviconUrl": "",
"thumbnailUrl": "/thumb/https://www.XXX.com/CCC",
"title": "CCC",
"url": "/https://www.XXX.com/CCC",
"webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/4",
"appId": "PID:11421"
},{
"devtoolsFrontendUrl": "/devtools/devtools.html?ws=localhost:9222/devtools/page/7",
"faviconUrl": "",
"thumbnailUrl": "/thumb/https://www.XXX.com/DDD",
"title": "DDD",
"url": "https://www.XXX.com/DDD"",
"webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/7",
"appId": "PID:11422"
},{
"devtoolsFrontendUrl": "/devtools/devtools.html?ws=localhost:9222/devtools/page/10",
"faviconUrl": "",
"thumbnailUrl": "/thumb/https://www.XXX.com/EEE",
"title": "EEE",
"url": "https://www.XXX.com/EEE",
"webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/10",
"appId": "PID:11423"
},{
"devtoolsFrontendUrl": "/devtools/devtools.html?ws=localhost:9222/devtools/page/13",
"faviconUrl": "",
"thumbnailUrl": "/thumb/about:blank",
"title": "",
"url": "about:blank",
"webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/13",
"appId": "PID:11444"
}]
macaca server log

remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:29]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":"["NATIVE_APP","WEBVIEW_2","WEBVIEW_3","WEBVIEW_4","WEBVIEW_7","WEBVIEW_10","WEBVIEW_13"]"}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:29]: method: POST url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/context, jsonBody: {"name":"WEBVIEW_10"}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
client.js:100:14 [master] pid:25470 Disconnecting from Remote debugger
client.js:36:16 [master] pid:25470 Remote debugger websocket disconnected with url: ws://localhost:9222/devtools/page/13
client.js:31:16 [master] pid:25470 Remote debugger connected to websocket url: ws://localhost:9222/devtools/page/10
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:29]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":null}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:31]: method: GET url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/url, jsonBody: {}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:31]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":""about:blank""}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:33]: method: GET url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/contexts, jsonBody: {}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:33]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":"["NATIVE_APP","WEBVIEW_2","WEBVIEW_3","WEBVIEW_4","WEBVIEW_7","WEBVIEW_10","WEBVIEW_13"]"}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:33]: method: POST url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/context, jsonBody: {"name":"WEBVIEW_7"}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
client.js:100:14 [master] pid:25470 Disconnecting from Remote debugger
client.js:36:16 [master] pid:25470 Remote debugger websocket disconnected with url: ws://localhost:9222/devtools/page/10
client.js:31:16 [master] pid:25470 Remote debugger connected to websocket url: ws://localhost:9222/devtools/page/7
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:33]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":null}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:35]: method: GET url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/url, jsonBody: {}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:35]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":""about:blank""}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:37]: method: GET url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/contexts, jsonBody: {}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:37]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":"["NATIVE_APP","WEBVIEW_2","WEBVIEW_3","WEBVIEW_4","WEBVIEW_7","WEBVIEW_10","WEBVIEW_13"]"}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:37]: method: POST url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/context, jsonBody: {"name":"WEBVIEW_4"}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
client.js:100:14 [master] pid:25470 Disconnecting from Remote debugger
client.js:36:16 [master] pid:25470 Remote debugger websocket disconnected with url: ws://localhost:9222/devtools/page/7
client.js:31:16 [master] pid:25470 Remote debugger connected to websocket url: ws://localhost:9222/devtools/page/4
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:37]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":null}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:39]: method: GET url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/url, jsonBody: {}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:39]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":""about:blank""}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:41]: method: GET url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/contexts, jsonBody: {}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:41]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":"["NATIVE_APP","WEBVIEW_2","WEBVIEW_3","WEBVIEW_4","WEBVIEW_7","WEBVIEW_10","WEBVIEW_13"]"}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:41]: method: POST url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/context, jsonBody: {"name":"WEBVIEW_3"}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
client.js:100:14 [master] pid:25470 Disconnecting from Remote debugger
client.js:36:16 [master] pid:25470 Remote debugger websocket disconnected with url: ws://localhost:9222/devtools/page/4
client.js:31:16 [master] pid:25470 Remote debugger connected to websocket url: ws://localhost:9222/devtools/page/3
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:41]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":null}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:43]: method: GET url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/url, jsonBody: {}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:43]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":""about:blank""}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:45]: method: GET url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/contexts, jsonBody: {}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:45]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":"["NATIVE_APP","WEBVIEW_2","WEBVIEW_3","WEBVIEW_4","WEBVIEW_7","WEBVIEW_10","WEBVIEW_13"]"}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:45]: method: POST url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/context, jsonBody: {"name":"WEBVIEW_2"}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
client.js:100:14 [master] pid:25470 Disconnecting from Remote debugger
client.js:36:16 [master] pid:25470 Remote debugger websocket disconnected with url: ws://localhost:9222/devtools/page/3
client.js:31:16 [master] pid:25470 Remote debugger connected to websocket url: ws://localhost:9222/devtools/page/2
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:45]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":null}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:47]: method: GET url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/url, jsonBody: {}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:47]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":""about:blank""}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:47]: method: DELETE url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc, jsonBody: {}
macaca-ios.js:381:10 [master] pid:25470 Stoping iOS driver...

@xinxinga
Copy link
Author

e.g. ws://localhost:9222/devtools/page/7, title should be "DDD", not "about:blank"

@xinxinga xinxinga changed the title Cannot switch multiple webviews on iOS Cannot get the expected current_url after switch multiple webviews on iOS May 20, 2019
@xinxinga xinxinga changed the title Cannot get the expected current_url after switch multiple webviews on iOS Cannot get the expected current_url & title after switch multiple webviews on iOS May 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants