0% found this document useful (0 votes)
149 views5 pages

Configuration:: Go To My Computer - Properties - Advanced System Settings

The document provides instructions for setting up Selenium 3.x to run Firefox on Windows. It details downloading and extracting the geckodriver file to a specific folder location. It then explains how to configure the system path variable to reference this folder so that Selenium can locate the geckodriver file and properly launch Firefox. Troubleshooting tips are provided for errors related to Selenium being unable to find the browser binary.

Uploaded by

Amit Jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
149 views5 pages

Configuration:: Go To My Computer - Properties - Advanced System Settings

The document provides instructions for setting up Selenium 3.x to run Firefox on Windows. It details downloading and extracting the geckodriver file to a specific folder location. It then explains how to configure the system path variable to reference this folder so that Selenium can locate the geckodriver file and properly launch Firefox. Troubleshooting tips are provided for errors related to Selenium being unable to find the browser binary.

Uploaded by

Amit Jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Selenium

 3.x  Setup  For  Windows  


 
This  is  important  to  set  geckodriver  path  to  run  Firefox  Browser  using  Selenium  3.x  
version  
 
Download  latest  geckodriver  from  this  location:  
https://github.com/mozilla/geckodriver/releases  
 
Extract  the  geckodriver  and  save  the  geckodriver  at  any  location:  
1. Assume  you  have  the  folder  with  the  name  workspace  under  your  username    
2. Navigate  to  the  project  location  using  Windows  Explorer  
3. Create  a  folder  and  name  it  “lib”  
4. Copy  the  extracted  file  to  this  location  
5. Get  the  complete  path  of  the  location  
6. Example  path:  C:\Users\username\workspace\libs  
 
Configuration:  

• Go  to  My  Computer  -­‐>  Properties  -­‐>  Advanced  System  Settings  

• Click  on  Environmental  Variable  


 
• In  system  Variable,  select  the  Path  and  click  Edit

• Enter  the  following  information  in  the  variable  value:

C:\Users\username\workspace\libs  

• Click  OK  button    


• Restart  the  system.  

NOTE:  Multiple  directories  needs  to  be  separated  by  semi  colon  For  Example:  C:\Program  
Files;  C:\Users\username\workspace\libs  

NOTE:  geckodriver.exe  name  should  not  be  in  the  path,  only  the  folder  location  should  be  
in  the  path

Image  is  attached  below


 
 
 
 
 
 
 
 
 
 
 
 
If  you  see  this  error  message:  
 
Traceback  (most  recent  call  last):  
   File  "C:/Users/Anil  
Tomar/PycharmProjects/SeleniumWD2Tutorial/basicweb/RunFFTestsWindow
s.py",  line  14,  in  <module>  
       ffTest.test()  
   File  "C:/Users/Anil  
Tomar/PycharmProjects/SeleniumWD2Tutorial/basicweb/RunFFTestsWindow
s.py",  line  10,  in  test  
       driver  =  webdriver.Firefox()  
   File  "C:\Python34\lib\site-­‐packages\selenium\webdriver\firefox\webdriver.py",  line  
150,  in  __init__  
       keep_alive=True)  
   File  "C:\Python34\lib\site-­‐packages\selenium\webdriver\remote\webdriver.py",  
line  92,  in  __init__  
       self.start_session(desired_capabilities,  browser_profile)  
   File  "C:\Python34\lib\site-­‐packages\selenium\webdriver\remote\webdriver.py",  
line  179,  in  start_session  
       response  =  self.execute(Command.NEW_SESSION,  capabilities)  
   File  "C:\Python34\lib\site-­‐packages\selenium\webdriver\remote\webdriver.py",  
line  236,  in  execute  
       self.error_handler.check_response(response)  
   File  "C:\Python34\lib\site-­‐packages\selenium\webdriver\remote\errorhandler.py",  
line  192,  in  check_response  
       raise  exception_class(message,  screen,  stacktrace)  
selenium.common.exceptions.WebDriverException:  Message:  Expected  browser  
binary  location,  but  unable  to  find  binary  in  default  location,  no  
'moz:firefoxOptions.binary'  capability  provided,  and  no  binary  flag  set  on  the  
command  line  
 
 
Process  finished  with  exit  code  1  
 
 
Then  please  follow  these  steps:  
 
Find  the  location  of  your  Firefox  installation.  
Usually  it  is  -­‐>  C:\Program  Files  (x86)\Mozilla  Firefox\firefox.exe  
 
Add  this  to  your  code  like  this:  

You might also like