mozilla / geckodriver

WebDriver for Firefox
https://firefox-source-docs.mozilla.org/testing/geckodriver/
Mozilla Public License 2.0
7.03k stars 1.51k forks source link

How to make the underlying Marionette requests? #2070

Closed prRZ5F4LXZ closed 1 year ago

prRZ5F4LXZ commented 1 year ago

I want to understand how the underlying Marionette requests are sent to control the browser. Is there a minimal working example of the underlying Marionette commands (below the python wrapper level) for a simple session of HTTP requests sent to geckodriver (the following being one simple request)?

curl -s -H 'Content-Type: application/json' -d <capabilities> http://127.0.0.1:4444/session

System

Testcase

NA

Stacktrace

NA

Trace-level log

NA

whimboo commented 1 year ago

Marionette uses a custom socket protocol and we do not support accessing it directly. Is there a specific reason why the WebDriver protocol via geckodriver is not enough?

In case of further questions please join us at https://chat.mozilla.org/#/room/#webdriver:mozilla.org. The issue tracker here is actually used for bug reports and feature requests. Thanks.

prRZ5F4LXZ commented 1 year ago

Since Marionette is below WebDriver, I'd think there might be some features available in Marionette but not available in WebDriver. For example, this feature is not available in WebDriver due to a limit on the protocol. But since Referer can be added by a browser plugin, I don't see such a feature that must be forbidden in Marionette.

https://github.com/mozilla/geckodriver/issues/2069

https://firefox-source-docs.mozilla.org/testing/marionette/Protocol.html

"Clients may be implemented in any language that is capable of writing and receiving data over TCP socket."

So Marionette is based on TCP, indeed one level lower than HTTP.

But it is not clear what exact the TCP protocol is. The doc is not very clear on this. Is there a dedicated place to ask Marionette questions?

whimboo commented 1 year ago

Note that we will not enhance Marionette for such a request. For questions I have given a link to Matrix in my last comment.