I'm trying to access a site with selenium which requires a login, but I haven't had luck and I've been reading forums all day.
Here's the code:
#!/usr/bin/python2.7
import selenium
from selenium.webdriver.common.by import By
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from pyvirtualdisplay import Display
display = Display(visible=0, size=(1024, 768))
display.start()
browser = webdriver.Firefox()
browser.get('https://www.centurylink.com/business/login/')
username = selenium.find_element_by_id("user")
password = selenium.find_element_by_id("password")
username.send_keys("xxxxxx")
password.send_keys("xxxx")
selenium.find_element_by_name("submit").click()
print browser.page_source
browser.quit()
display.stop()
and I'm getting this error:
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/firefox_binary.py", line 98, in _wait_until_connectable raise WebDriverException("The browser appears to have exited " selenium.common.exceptions.WebDriverException: Message: The browser appears to have exited before we could connect. If you specified a log_file in the FirefoxBinary constructor, check it for details.
Would anyone please point me in the right direction?
Thanks!!