支持IOS 13.0以下
参考:https://github.com/google/ios-webkit-debug-proxy
工作原理图:
启动命令,直接:ios_webkit_debug_proxy
--debug
for verbose output.--frontend
to specify a frontend--help
for more options.Ctrl-C
to quit. Also, the proxy can be left running as a background process.
指定前端:
ios_webkit_debug_proxy -f chrome-devtools://devtools/bundled/inspector.html
ios_webkit_debug_proxy -f ~/chromium/src/third_party/WebKit/Source/devtools/front_end/inspector.html
ios_webkit_debug_proxy -f http://foo.com:1234/bar/inspector.html
http://chrome-devtools-frontend.appspot.com/static/27.0.1453.93/devtools.html
appium中封装API使用的协议:Webkit remote debugger protocol
https://github.com/appium/appium-remote-debugger
js发送websocket请求格式:
websocket.send(JSON.stringify({id:2,method:"DOM.getAttributes",params:{nodeId:12}}))
tips:很多方法不支持。
参考:
CDP协议命令:https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-requestNode
CDP协议详解:https://github.com/Pines-Cheng/blog/issues/82
最新协议开发者:https://inspect.dev/why