Thursday, 2 March 2017

how to install geckodriver on a windows system


how to install geckodriver on a windows system

Answer: You can put it anywhere. 


1. Download following driver 

Chrome:https://sites.google.com/a/chromium.org/chromedriver/downloads
Edge:https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
Firefox:https://github.com/mozilla/geckodriver/releases
Safari:https://webkit.org/blog/6900/webdriver-support-in-safari-10/


2. Unzip driver and put it into a folder. 
      
3. Load your driver in your code. 
    I want to open Chrome browser so I set the path up in my code. 

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

1 comment:

how-to-recursively-create-subfolder-in-each-folder-of-a-directory-in-cmd

test.cmd: @echo off setlocal for /f "usebackq tokens=*" %%a in (`dir /b /a:d`) do ( rem enter the directory pushd %%a echo...