Protractor: Pass command-line arguments to Firefox

Created on 2 Sep 2015  ·  3Comments  ·  Source: angular/protractor

Protractor config should provide a way to pass command-line arguments when launching Firefox
SeleniumHQ/selenium#998 states that it's currently possible via the Firefox webdriver.

docs

Most helpful comment

I stumpled upon this issue because Firefox now has a headless mode, which is activated with a command line flag.

All 3 comments

You can already do this via the capabilities object and the classes that jleyba mentioned on the issue you linked. Here is an example, which changes the firefox profile: https://github.com/juliemr/protractor-demo/tree/master/howtos/setFirefoxProfile

This is definitely difficult to figure out - I'm leaving this issue open because we should improve documentation to make this easier to set up.

At the least, I'd suggest an easy way to pass command line arguments, just like we have "chromeOptions" for when using the chrome browser.

I also noticed that "firefox_profile" is not documented as an option in the reference config file. That seems to be the solution used in the demo that @juliemr has linked for us above.

@juliemr - I found this thread when trying to have firefox create its temp files in a specific directory instead of in /tmp as it does by default. Is it possible to achieve this using FirefoxProfile? What I want to actually achieve is to clean up all temp files created by firefox during the tests. I tried using the shouldDeleteOnExit method, but it doesn't work exactly as expected.

I stumpled upon this issue because Firefox now has a headless mode, which is activated with a command line flag.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jmcollin78 picture jmcollin78  ·  3Comments

davidkarlsen picture davidkarlsen  ·  3Comments

vishalshivnath picture vishalshivnath  ·  3Comments

mvolkmann picture mvolkmann  ·  3Comments

codef0rmer picture codef0rmer  ·  3Comments