The
issue raised with the ios-webkit-debugging-proxy has been resolved (woohoo) :).
We have been
working on getting it running on a real devices (with some success) however with limited javascript experience :(.
When you are using the proxy there are differences:
- We establish a web socket connection directly with each WebView (rather than a tcp connection).
- the list of web views can be retrieved from the json generated by the proxy.
- The protocol used is the webkit remote debugging protocol (rather than the WebInspector protocol)
- The only real difference between the two is that the Web Inspector protocol has additional parameters and it sends the request as a plist
Setup:1. Pull the latest version of the
ios-webkit-debug-proxy and install it. The brew install didn't seem to have the fix, so i ran the following:
./autogen.sh
./configure
make
sudo make install
2. Start the proxy with this command:
ios_webkit_debug_proxy -c :27752-27758 -d
3. Start
appium with a real device (and put a break point at the "this.socket.send(data) line 512 of the webkit-remote-debugger.js").
Note: I have a feeling there is a threading/cb issue somewhere as when i let my test run the proxy simply disconnects but if I give it a second it works (we're having a look into this)
4 Run a simple test to switch to the latest window and find an element using id.
5. Eventhough it states that it has responded with a success, the test doesn't continue and is still waiting!.
Loggging:debug: Appium request initiated at /wd/hub/session/811f7d7d-b4d3-453c-8338-b14738947912/window_handles
info: [REMOTE] Debugger web socket connected to url [ws://localhost:27753/devtools/page/3]
info: Responding to client with success: {"status":0,"value":["3"],"sessionId":"811f7d7d-b4d3-453c-8338-b14738947912"}
GET /wd/hub/session/811f7d7d-b4d3-453c-8338-b14738947912/window_handles 200 7ms - 98
debug: Appium request initiated at /wd/hub/session/811f7d7d-b4d3-453c-8338-b14738947912/window
info: Remote debugger is already connected to window [3]
debug: Request received with params: {"name":"3"}
info: Responding to client with success: {"status":0,"value":"3","sessionId":"811f7d7d-b4d3-453c-8338-b14738947912"}
POST /wd/hub/session/811f7d7d-b4d3-453c-8338-b14738947912/window 200 1ms - 88
debug: Appium request initiated at /wd/hub/session/811f7d7d-b4d3-453c-8338-b14738947912/element
debug: Request received with params: {"using":"id","value":"userName"}
info: [REMOTE] Executing 'find_element' atom in default context
recv {"result":{"result":{"type":"string","value":"{\"status\":0,\"value\":{\"ELEMENT\":\":wdc:1368002061154\"}}"},"wasThrown":false},"id":1}
info: Responding to client with success: {"status":0,"value":{"ELEMENT":"5000"},"sessionId":"811f7d7d-b4d3-453c-8338-b14738947912"}POST /wd/hub/session/811f7d7d-b4d3-453c-8338-b14738947912/element 200 13165ms - 112
We are getting close... any help would be really appreciated.
Thanks,
Sergio
On Wednesday, 10 April 2013 17:41:31 UTC+1, Sergio Neves Barros wrote: