Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

Enhancement: Wireshark debugger for JSON wire protocol #861

Closed
lukeis opened this issue Mar 2, 2016 · 7 comments
Closed

Enhancement: Wireshark debugger for JSON wire protocol #861

lukeis opened this issue Mar 2, 2016 · 7 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 2, 2016

Originally reported on Google Code with ID 861

Would be nice

Reported by dawagner on 2010-10-06 10:10:52

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Best to elaborate the enhancement. Is it an integrated sniffer/debugger with Selenium
2 server? Or integrated with client driver bindings? 

Or perhaps a Wireshark (filter) addon to parse captured traces specifically for JSONWireProtocol?
If Wireshark addon, is there a corresponding issue/ticket for Wireshark project?

Or perhaps a browser extension that can be used to sniff JSONWireProtocol requests/responses
when WebDriver is used? Possible here since JSONWireProtocol is based on REST/HTTP.
Browser extension may be nice feature. Initially implement for Firefox, and core team
or outside developers can consider extending to Chrome and IE later. For Firefox can
base work off of extensions like HttpFox or liveHttpHeaders for the sniffing & analysis
part, and also base off of tools like RESTClient, Poster, HTTPRequester, and JSONView
for stepping through JSONWireProtocol calls, and analyzing output. For IE, can base
off tools like ieHttpHeaders.

I like the browser extension idea. Nice to bundle such a debugger with the WebDriver
Firefox addon that is used to run WebDriver tests. And this may be most easily utilized
with the Python and Ruby bindings via their interactive shells to execute WebDriver
commands. With Java and .NET bindings (unless using Jython, JRuby, IronPython, or IronRuby),
you'd may have to invoke the debugger to step through code and make use of the browser
extension. Or provide new JSONWireProtocol command to set a pause/breakpoint in WebDriver
execution to make use of extension/debugger where you can then resume code execution
after debugging, etc. And also may be nice to load the browser addon w/o having to
start up WebDriver in code. Just use directly from Firefox.

Just my two cents.

Reported by mangaroo on 2011-12-23 00:53:26

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

What I'm envisaging is a filter which parses traces for the JSONWireProtocol to help
with debugging selenium issues, so that rather than having to manually parse the HTTP
requests, I can just see "findElement {id: foo} followed by click", ...

Reported by dawagner on 2012-01-03 21:35:30

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

In that case, I recommend these options, most preferable to implement both, perhaps
split off into two issues (I can create separate issue if desired):

* create Wireshark filter that parses the traces, filter to be copied to Wireshark
app and loaded at Wireshark runtime then load Wireshark traces to parse out the protocol

* enhance WebDriver Firefox extension to incorporate built in HTTP sniffer that can
do same filtering and display, in a window pane or popup window like Firebug. Enabled
via option specified in WebDriver code, JSONWireProtocol command, or server startup
option parameter.

I would like to have filtering integrated with Firefox extension so that one doesn't
have to separately capture traces with Wireshark and then analyze, why not do it real
time (as well as capture to file) all within the browser.

Reported by mangaroo on 2012-01-03 22:38:26

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

On another thought, it could also be useful for the server to dump JSONWireProtocol
requests it receives and the responses it sends back, to file (or stdout) based on
specifying an server startup option parameter that enables it.

Then one can open up the dumped log, which ideally should already be formated (in plain
text, JSON, or XML?). This would be similar to trace files saved by LiveHttpHeaders
and ieHttpHeaders browser extensions.

With this approach don't need browser extension work, don't need Wireshark either.

Though this approach will contain all traffic to/from server rather than from client
side, or maybe have another option parameter to filter it out to specific client node(s).

Reported by mangaroo on 2012-01-03 22:44:43

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Reported by jmleyba on 2012-11-20 05:25:09

  • Labels added: Component-WebDriver

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Closing since this will probably never happen and there is no immediate need.

Reported by jmleyba on 2013-12-19 06:22:27

  • Status changed: WontFix

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Reported by luke.semerau on 2015-09-17 17:50:17

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this as completed Mar 2, 2016
@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant