question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why must set the webdriver.gecko.driver system property?

See original GitHub issue

Bug report

  • Node Version: 6.10.3
  • Protractor Version: 5.1.2
  • Angular Version: 4.2.6
  • Browser(s): Firefox 52.2.0 (64-bit), Google Chrome 59
  • Operating System and Version RHEL 7
  • Your protractor configuration file: Angular CLI 1.2.0 defaults +
    capabilities: {
        browserName: 'firefox',
        marionette: true
    },
    directConnect: false,
    localSeleniumStandaloneOpts: {
        jvmArgs: ['-Dwebdriver.gecko.driver=/home/rkrisztian/projects/testProject/node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.18.0']
    },
  • A relevant example test: Not needed, issue is driver-specific, and when driver is OK, tests pass.
  • Output from running the test:

When I specify no jvmArgs in the configuration file, I get:

[13:54:20] I/launcher - Running 1 instances of WebDriver
[13:54:20] I/local - Starting selenium standalone server...
[13:54:24] I/local - Selenium standalone server started at http://10.20.204.182:59199/wd/hub
[13:54:25] E/launcher - The path to the driver executable must be set by the webdriver.gecko.driver system property; for more information, see https://github.com/mozilla/geckodriver. The latest version can be downloaded from https://github.com/mozilla/geckodriver/releases

Otherwise everything is OK and tests are executed:

[13:55:03] I/launcher - Running 1 instances of WebDriver
[13:55:03] I/local - Starting selenium standalone server...
[13:55:05] I/local - Selenium standalone server started at http://10.20.204.182:33088/wd/hub
Jasmine started
(...)

But specifying the full path to the GeckoDriver defeats the purpose of the webdriver-manager which should just provide this setting for me, including whatever version is available. I shouldn’t be setting this jvmArg property, it doesn’t make any sense. As we don’t do the same with Chrome, which just works.

  • Steps to reproduce the bug:

I’m using Angular CLI 1.2.0, and the developers there provide no support in this regard, so I came here.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
cnishinacommented, Jul 29, 2017

I just also came to the same conclusion that this is not good. Protractor should be able to get this done. With Chrome, we let users set chromeDriver in the configuration file and the local driver will use it…if not we check the webdriver-manager/selenium folder.

Proposed idea to fix this: https://github.com/angular/protractor/issues/4411

I think I can fix this now. I’ve been meaning to have a distraction from writing my book.

0reactions
wswebcreationcommented, Jul 30, 2017

Tnx @cnishina ,

Didn’t saw that, sorry

Read more comments on GitHub >

github_iconTop Results From Across the Web

In System.setProperty("webdriver.gecko.driver", "<Path to your ...
Exception in thread "main" java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system property.
Read more >
The path to the driver executable must be set by the webdriver ...
1 Answer. Selenium WebDriver Java code: Download Gecko Driver from https://github.com/mozilla/geckodriver/releases based on your platform. ...
Read more >
How to use GeckoDriver in Selenium? - Tools QA
We need to add a single line of code to set up the system properties for the GeckoDriver- System.setProperty("webdriver.gecko.driver","<Path ...
Read more >
GeckoDriver exception while launching Firefox - ArtOfTesting
... in thread main java lang IllegalStateException the path to the driver executable must be set by the webdriver.gecko.driver system property.
Read more >
Fixing Selenium WebDriver Executable Path Error - Baeldung
chrome.driver system property“. This error prevents Selenium from launching the browser. It's caused by an incomplete configuration. We'll learn ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found