+91 9790664230
kumar.arun211@gmail.com

How to open Firefox browser by passing driver executable path

Blog to learn python selenium from java selenium

How to open Firefox browser by passing driver executable path

In this post, we have seen how to start Firefox. Before executing the script, we ensured that Firefox driver is available in PATH.

There is another way to start Firefox without PATH settings.

Instead of setting PATH environment variable, executable_path property can be passed while invoking Firefox instance.

Syntax:
driver = webdriver.Firefox(executable_path=”[path to driver location]”);


from selenium import webdriver
driver = webdriver.Firefox(executable_path="/data/Drivers/geckodriver");
driver.get("http://www.google.com");

 

4 Responses

  1. […] How to open Firefox browser by passing driver executable path […]

  2. […] How to open Firefox browser by passing driver executable path […]

  3. […] How to open Firefox browser by passing driver executable path […]

  4. […] How to locate elements in Python Selenium Webdriver – Selenium Blog on How to open Firefox browser by passing driver executable path […]

Leave a Reply

Your email address will not be published. Required fields are marked *

© 2018 Copyrights. All Rights Reserved. Arunkumar Velusamy