from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.ui impo
I have resolved this issue.
If your jar files are older than the latest version and the browser has updated to latest version, then download:
geckodriver.exe
.I got the same error when issuing a URL without the protocol (like localhost:4200
) instead of a correct one also specifying the protocol (e.g. http://localhost:4200).
Google Chrome works fine without the protocol (it takes http as the default), but Firefox crashes with this error.
If your are using it in windows machine, check whether the selenium webdriver you have installed is of the latest one. I just now explored that my webdriver is of old one and it just opens the firefox but it couldn't process the get function.
Updation of the webdriver resolves this problem
@Neeraj
I've resolved this problem, but i'm not sure if you are the same reason.
In general, my problem was caused by some permission issues.
I tried to move my whole project into ~/:
mv xxx/ ~/
and then i change give it the 777 permission:
chmod -R 777 xxx/
I'm not familiar with linux permission so i just do this to make sure i have permission to execute the program.
Even you don't have permission, the selenium program will not prompt you.
So, good luck.
Since you mentioned you use a proxy, try setting up the firefox driver with a proxy by following the answer given here proxy selenium python firefox
I had the same problem but with Chrome.
Solved it using the following steps
Here's the code and it worked fine
from selenium import webdriver
class InstaBot(object):
def __init__(self):
self.driver=webdriver.Chrome("C:\Program
Files(x86)\Google\Chrome\Application\chromedriver.exe")# make sure
#it is chrome driver
self.driver.get("https://www.wikipedia.com")
InstaBot()