I looked through the selenium 3 for python documentation but still couldn’t get the difference between these two different driver calls.
webdriver.Firefox()
>
If you define the path for the driver, Functional call look for the file in the path and works accordingly. Second function driver.Firefox() / driver.Chrome()
looks for existing software in the system. if the browser is not present you'll be getting following error.
WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
My take is always use absolute path for the driver definition.
from selenium import webdriver
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
binary = FirefoxBinary('path/to/installed firefox binary')
driver = webdriver.Firefox(firefox_binary=binary)