Vasundhara
Vasundhara

Reputation: 1

Unable to install gecko driver to run protractor test scripts in fire fox browser

I am new to "Protractor tool", I am able to run my test script in "Chrome" browser. Now I want to run my test script in "Firefox" for that I need to install "gecko driver".

Can anyone tell me how to install "gecko driver" to run test script in "firefox" browser?

I am using

  1. Node -- v6.11.3

  2. NPM -- 3.10.10

  3. Protractor -- 5.1.2

Upvotes: 0

Views: 834

Answers (3)

PDHide
PDHide

Reputation: 19989

if webdriver-manger update is not working , then download the driver manually from : https://github.com/mozilla/geckodriver/releases

Now goto :

 C:\Users\somepath\node_modules\protractor\node_modules\webdriver-manager\selenium
 and below property to update-config.json





   "gecko": {
        "last": "C:\\pathtogeko\\geckodriver.exe"
    }

create a new file with that content if it doesn't exists:

{
       "gecko": {
            "last": "C:\\pathtogeko\\geckodriver.exe"
        }
}

Upvotes: 0

Optimworks
Optimworks

Reputation: 2547

Its very simple. Just do following:

  1. Check whether Gecko driver driver is already installed or not in your machine using command - "webdriver-manager status". This will show what has already installed like Selenium Server, IE, Chrome and Gecko drivers and version details on command prompt
  2. If you do not find the Gecko in the above list. Run below command to install the Gecko driver - webdriver-manager update

  3. Once Gecko driver installed, change the browserName:"firefox" in conf.js file and run your test scripts.

Upvotes: 1

Pac0
Pac0

Reputation: 23174

The downloads (and source code) for Gecko driver is available here :

https://github.com/mozilla/geckodriver/releases

Instructions for installation are there also. There are compiled binaries available for Windows, Linux and MacOS.

Upvotes: 0

Related Questions