Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to install geckodriver on a windows system

I am trying to intall webdriver and in order to open firefox i need the geckodriver to be installed and in the correct path.

Firstly the download link to install geckodriver only allows you to install a file that is not an executable. So is there a way to make it an executable?

secondly I have tried to change my path variables in commmand prompt, but of course it didn't work. I then changed the user variable not the system path variables because there is not Path in system. there is a Path in user variables so I edited that to change where the file is located.

I have extracted the geckodriver rar file and have received a file with no extension. I don't know how you can have a file with no extension, but they did it. The icon is like a blank sheet of paper with a fold at the top left.

If anyone has a solution for this including maybe another package that is like webdriver and will allow me to open a browser and then refresh the page after a given amount of time. this is all I want to do.

like image 871
Contro Avatar asked Mar 01 '17 05:03

Contro


People also ask

How do I find my Windows GeckoDriver version?

View the version of the Selenium WebDriver you are using as shown below: Next, go to https://firefox-source-docs.mozilla.org/testing/geckodriver/geckodriver/Support.html and check for required Firefox version supported by Selenium and Gecko driver: In my case, Selenium Webdriver version is 3.9.

Where is GeckoDriver exe?

The geckodriver.exe does not exist in the current directory or in a directory on the PATH environment variable. The driver can be downloaded at https://github.com/mozilla/geckodriver/releases. Using: Selenium 2.53.

How do I download GeckoDriver for selenium?

Step 1: Selenium FirefoxDriver or Selenium GeckoDriver can be downloaded from the official GitHub repository of Mozilla. Go to the link and scroll towards the bottom of the page. Open the Assets menu and download the Selenium FirefoxDriver respective to your operating system. Step 2: Extract the downloaded file.


2 Answers

First download GeckoDriver for Windows, extract it and copy the path to the folder.

  • Right-click on My Computer or This PC.
  • Select Properties.
  • Select advanced system settings.
  • Click on the Environment Variables button.
  • From System Variables select PATH.
  • Click on Edit button.
  • Click New button.
  • Paste the path of GeckoDriver file.
like image 141
Webkraft Studios Avatar answered Nov 12 '22 02:11

Webkraft Studios


You can put it anywhere. 1. put it into your project folder. 2. create a folder and put driver into it. Set the driver path up in your code.

  from selenium import webdriver
  path="C:\\Programs\\Python36\\BrowersDriver\\chromedriver.exe"
  driver=webdriver.Chrome(path)
  driver.get("http://www.yahoo.com")
  driver.close()
  driver.quit()

http://kennethhutw.blogspot.sg/2017/03/how-to-install-geckodriver-on-windows.html

like image 44
Hu Kenneth Avatar answered Nov 12 '22 03:11

Hu Kenneth