+91 9790664230
kumar.arun211@gmail.com

How to open Firefox browser by passing driver executable path

The Blog to Learn 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");

 

Leave a Reply

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

© 2019 Copyrights. All Rights Reserved. Arunkumar Velusamy