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.
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")