Clarification on setting capability "marionette"

3,326 views
Skip to first unread message

Kendall Schmidt

unread,
Oct 12, 2016, 7:39:57 PM10/12/16
to Selenium Developers
I'm hoping I can get some clarification regarding what behavior should be expecting when setting the Firefox desired capability "marionette".

I'm running a Selenium Grid (therefore calling RemoteWebDriver).

Binding: Java
Selenium: v3.0.0-beta4
GeckoDriver: v0.11.1 (deployed to grid node, system property "webdriver.gecko.driver" is set)
Firefox: v49.0.1 or v47.0.1 (depending on test)

Basic code being called (simplified for brevity):
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities
.setCapability(CapabilityType.PROXY, proxy);
capabilities
.setCapability(FirefoxDriver.MARIONETTE, false);
WebDriver webDriver = new RemoteWebDriver(remoteAddress, desiredCapabilities);

Based on what Firefox browser being used and the true|false value being passed to setCapability, I see the following:

Firefox v49.0.1 w/out calling setCapability (I believe defaults to "marionette" = true) - tests pass, but no proxy is set in browser (I believe there is an open issue about this)
Firefox v49.0.1 w/calling setCapability("marionette", true) - same result as above
Firefox v49.0.1 w/calling setCapability("marionette", false) - See browser open but fails with connect error (Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms.). I expect this to happen.

Nothing above surprises me, although the proxy not getting set is a problem for me. Hope this gets resolved soon :-)

What I'm a little confused about is when I run using Firefox v47.0.1, I see the following:

Firefox v47.0.1 w/calling setCapability("marionette", false) - tests pass and proxy is set in browser. This is same behavior I get w/Selenium v2.53.1, no geckoDriver deployed
Firefox v47.0.1 w/calling setCapability("marionette", true) - tests pass, but no proxy is set in browser (again, believe this is a known issue). I didn't expect this at all.

Here my questions:
  1. I'm under the impression that Firefox versions <48'ish do not work with Selenium v3.x (only with Selenium v2.x), is this still correct? Or does setting "marionette" = false allow for this now?
  2. I'm under the impression that Firefox versions >47.0.1 only work with Selenium v3.x, is this still correct?
  3. Not calling setCapability does default to "marionette" = true?
  4. What exactly is "marionette"? What is its relationship to geckoDriver, if any? What is its relationship to gecko engine, if any?

Appreciate in advance any insight anyone can provide.


Luke Inman-Semerau

unread,
Oct 12, 2016, 11:16:50 PM10/12/16
to selenium-...@googlegroups.com
Hope I can clear things up a bit -

With Selenium 2.53.1,  geckodriver support does not really exist (it does, but it's really buggy and the marionette desired capability is basically ignored). I would not recommend attempting to use geckodriver with 2.53.1. You can however use up to FF 47.0.1 with it.

With 3.0 beta (and soon 3.0.0). You may use either GeckoDriver for Firefox 48+ or you may use the 'legacy' FirefoxDriver (extension) with Firefox 47.0.1 and below. By default marionette (aka geckodriver) is enabled, one must either use the desired capability "marionette": false  or you can set a system property when you start a standalone server to disable it:  java -Dwebdriver.firefox.marionette=false -jar selenium-server-standalone.jar

And by 'disable' I mean to have the selenium server use the legacy FirefoxDriver extension that only works with 47.0.1 and prior versions.

What is marionette / geckodriver / etc???  I would recommend reading the README on the geckodriver project https://github.com/mozilla/geckodriver and linked document about marionette - https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette

To summarize, marionette is inside of Firefox (and has been for quite a while). It is an automation tool for the browser. GeckoDriver is a translation service that runs as an external process that translates WebDriver HTTP commands to marionette commands.

--
You received this message because you are subscribed to the Google Groups "Selenium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-developers+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-developers/e513e8f4-5def-43f5-a0b2-7691f1f99b56%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kendall Schmidt

unread,
Oct 13, 2016, 11:20:38 AM10/13/16
to selenium-...@googlegroups.com
Luke,

Thank you very much for this explanation. So to reiterate/confirm, I can do the following using Selenium 3.0.0-beta4 (soon 3.0.0)
  1. With Firefox 48+, use GeckoDriver, with/without setting desired capability "marionette": true
  2. With Firefox 47.0.1 (or prior versions), use the 'legacy' FirefoxDriver (extension) setting desired capability "marionette": false
Correct?

Follow-on question:

Is there any plan to support proxy capability?

To unsubscribe from this group and stop receiving emails from it, send an email to selenium-developers+unsubscribe...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-developers/d8KpXpmDp2g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-developers+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-developers/CAL97Zu7ZMoujSY9zawc6ck42jMw%3DRdAGUA%2B3Y%2B%2BKq1_7MWP9fQ%40mail.gmail.com.

Luke Inman-Semerau

unread,
Oct 13, 2016, 11:59:26 AM10/13/16
to selenium-...@googlegroups.com
Correct.

proxy support for geckodriver you ask?  ¯\_()_/¯  you'll need to check with the geckodriver project. It's in the w3c spec, so if it's not working now, they'll get to it soon. If you can't find an issue logged for it already, feel free to create a new one on that project.

To unsubscribe from this group and all its topics, send an email to selenium-developers+unsubscribe...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-developers+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-developers/CAGEj7zPv%3DMRe0HPGi4NF_3yn4n54tro2VXsAJGH9kUj2SdvBJw%40mail.gmail.com.

Andreas Tolfsen

unread,
Oct 13, 2016, 1:00:57 PM10/13/16
to selenium-...@googlegroups.com, Kendall Schmidt
Kendall Schmidt <kendall....@gmail.com> writes:

> Is there any plan to support proxy capability?

Setting a proxy with geckodriver/Marionette is only supported if you
set it in the requiredCapabilities object.

Most client bindings have a required capabilities argument in their
WebDriver class constructors.

Luke Inman-Semerau

unread,
Oct 13, 2016, 1:09:33 PM10/13/16
to selenium-...@googlegroups.com, Kendall Schmidt
Except for grid... where it flat out ignores requiredCaps and doesn't forward it along :-/

--
You received this message because you are subscribed to the Google Groups "Selenium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-developers+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-developers/20161013180051.1dddfe7d3a7765b6a909640e%40mozilla.com.

Luke Inman-Semerau

unread,
Oct 14, 2016, 2:26:18 AM10/14/16
to selenium-...@googlegroups.com
I just pushed a change that will let the requiredCapabilities through too... will be in 3.1 of selenium :)

On Thu, Oct 13, 2016 at 10:09 AM, Luke Inman-Semerau <luke.s...@gmail.com> wrote:
Except for grid... where it flat out ignores requiredCaps and doesn't forward it along :-/
On Thu, Oct 13, 2016 at 10:00 AM, Andreas Tolfsen <a...@mozilla.com> wrote:
Kendall Schmidt <kendall....@gmail.com> writes:

> Is there any plan to support proxy capability?

Setting a proxy with geckodriver/Marionette is only supported if you
set it in the requiredCapabilities object.

Most client bindings have a required capabilities argument in their
WebDriver class constructors.

--
You received this message because you are subscribed to the Google Groups "Selenium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-developers+unsubscribe...@googlegroups.com.

Kendall Schmidt

unread,
Oct 21, 2016, 9:15:37 AM10/21/16
to Selenium Developers
Thanks Luke.  Did you mean 3.0.1 or 3.1? Just checking...


On Friday, October 14, 2016 at 1:26:18 AM UTC-5, Luke Inman-Semerau wrote:
I just pushed a change that will let the requiredCapabilities through too... will be in 3.1 of selenium :)
On Thu, Oct 13, 2016 at 10:09 AM, Luke Inman-Semerau <luke.s...@gmail.com> wrote:
Except for grid... where it flat out ignores requiredCaps and doesn't forward it along :-/
On Thu, Oct 13, 2016 at 10:00 AM, Andreas Tolfsen <a...@mozilla.com> wrote:
Kendall Schmidt <kendall....@gmail.com> writes:

> Is there any plan to support proxy capability?

Setting a proxy with geckodriver/Marionette is only supported if you
set it in the requiredCapabilities object.

Most client bindings have a required capabilities argument in their
WebDriver class constructors.

--
You received this message because you are subscribed to the Google Groups "Selenium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-developers+unsub...@googlegroups.com.

Luke Inman-Semerau

unread,
Oct 21, 2016, 11:31:26 AM10/21/16
to selenium-...@googlegroups.com
3.0.1

On Fri, Oct 21, 2016 at 6:15 AM, Kendall Schmidt <kendall....@gmail.com> wrote:
Thanks Luke.  Did you mean 3.0.1 or 3.1? Just checking...

On Friday, October 14, 2016 at 1:26:18 AM UTC-5, Luke Inman-Semerau wrote:
I just pushed a change that will let the requiredCapabilities through too... will be in 3.1 of selenium :)
On Thu, Oct 13, 2016 at 10:09 AM, Luke Inman-Semerau <luke.s...@gmail.com> wrote:
Except for grid... where it flat out ignores requiredCaps and doesn't forward it along :-/
On Thu, Oct 13, 2016 at 10:00 AM, Andreas Tolfsen <a...@mozilla.com> wrote:
Kendall Schmidt <kendall....@gmail.com> writes:

> Is there any plan to support proxy capability?

Setting a proxy with geckodriver/Marionette is only supported if you
set it in the requiredCapabilities object.

Most client bindings have a required capabilities argument in their
WebDriver class constructors.

--
You received this message because you are subscribed to the Google Groups "Selenium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-developers+unsubscribe...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-developers+unsub...@googlegroups.com.

Kendall Schmidt

unread,
Oct 24, 2016, 2:40:47 PM10/24/16
to selenium-...@googlegroups.com
@luke  I gave your change a shot but still cannot get the poxy set using RemoteWebDriver(remoteAddress, desiredCapabilities, requiredCapabilities). I can see the desiredCapabilities and requiredCapabilities getting merged in RemoteWebDriver.startSession() but from there I don't know what happens.

Currently, the only way I can get the proxy set is by constructing a requiredCapabilities JSON object like this:
 {"requiredCapabilities":{"proxy":{"proxyType":"manual","httpProxy":"<host>","httpProxyPport":"<port>"}}}

and setting it in the desiredCapabilities like this:
desiredCapabilities.setCapability("requiredCapabilities", <my_requiredCapabilities_JSON_object>)

I tried a variations of the JSON - e.g. {"proxyType":"manual","httpProxy":"<host>","httpProxyPport":"<port>"}
and setting requiredCapabilities.setCapability("proxy", <my_simplified_requiredCapabilities_JSON_object>

but that didn't work.

I'm guessing I don't have the JSON properly constructed to be used by requiredCapabilities.

On Fri, Oct 21, 2016 at 10:31 AM, Luke Inman-Semerau <luke.s...@gmail.com> wrote:
3.0.1

On Fri, Oct 21, 2016 at 6:15 AM, Kendall Schmidt <kendall....@gmail.com> wrote:
Thanks Luke.  Did you mean 3.0.1 or 3.1? Just checking...

On Friday, October 14, 2016 at 1:26:18 AM UTC-5, Luke Inman-Semerau wrote:
I just pushed a change that will let the requiredCapabilities through too... will be in 3.1 of selenium :)

On Thu, Oct 13, 2016 at 10:09 AM, Luke Inman-Semerau <luke.s...@gmail.com> wrote:
Except for grid... where it flat out ignores requiredCaps and doesn't forward it along :-/

On Thu, Oct 13, 2016 at 10:00 AM, Andreas Tolfsen <a...@mozilla.com> wrote:
Kendall Schmidt <kendall....@gmail.com> writes:

> Is there any plan to support proxy capability?

Setting a proxy with geckodriver/Marionette is only supported if you
set it in the requiredCapabilities object.

Most client bindings have a required capabilities argument in their
WebDriver class constructors.

--
You received this message because you are subscribed to the Google Groups "Selenium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-developers+unsubscribe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-developers/20161013180051.1dddfe7d3a7765b6a909640e%40mozilla.com.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Selenium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-developers+unsubscribe...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-developers/d8KpXpmDp2g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-developers+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-developers/CAL97Zu5VD_pD5PvA9-kDvHqELjo65En9D0diZwR7BZCNMKrVng%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages