Reputation: 1857
geckodriver does launch Firefox but firefox doesn't get url. Please see and point what's wrong with my function. would be great help as im very new to selenium and python
import selenium
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
def Login(SiteUrl):
driver = webdriver.Firefox()
driver.get(SiteUrl)
if __name__ =="__main__":
url = "www.google.com"
Login(url)
Upvotes: 0
Views: 132
Reputation: 17553
That simply means either your libs are old or Gecko binary is old. New gecko-libs are available now.
Download it from :
https://github.com/mozilla/geckodriver/releases
Download new version of selenium python libs from below URL:
https://pypi.python.org/pypi/selenium
Another thing as Martin point out
Add the protocol like http
or https
before passing URL
So use URL as :
url = "https://www.google.com"
Upvotes: 0
Reputation: 823
There could be multiple reasons -
Try including HTTP protocol in the url i.e. - http://www.google.com
You might be behind a proxy server. See this SO question -> Selenium WebDriver: Firefox starts, but does not open the URL & Selenium WebDriver.get(url) does not open the URL
Your versions of the driver and the browser does not match.
Upvotes: 1