os:windows 7 selenium version 3.0.1 mozilla firefox:48.0.2
Traceback (most recent call last):
File \"C:\\Users\\LENOVO\\Desktop\\kk2.py\", line 4, in
For Linux based system, download geckodriver. Extract it and copy the driver to /usr/local/bin and finally make it executable (chmod +x geckodriver).
please check the answer:
https://stackoverflow.com/a/37765661
https://stackoverflow.com/a/40208762
Shortly,
From selenium 3.0, you have to explicitly download Marionette geckodriver
for Firefox (which is similar to ChromeDriver for Chrome) and keep it in a place where the system can identify it. (like System PATH - environmental variables in Windows) or specify using language options.
References:
Linux(Ubuntu) Users should download the geckodriver and extract it in your project folder and while running your python script give the argument as
executable_path="./geckodriver"
Example:
from selenium import webdriver
class RunFFTests():
def testMethod(self):
# Initiate the driver instance
driver = webdriver.Firefox(
executable_path="./geckodriver")
driver.get("http://www.letskodeit.com")
ff = RunFFTests()
ff.testMethod()
For mac users use:
brew install geckodriver
I just download Gecko file and paste in where your python file is. It solves the problem!