Running Windows 7 Professional, Python 2.7, Selenium 3.0.1, Firefox 49.0.1
I'm using Python to start up Firefox and log into our intranet (which is self-signing). I've put in the latest gecko driver (which lets me connect)
When try to simply connect to our internal web
from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
driver = webdriver.Firefox()
driver.implicitly_wait(30)
driver.get("https://<my internal ip>/")
I immediately get "You connection is not secure". I click on Advanced | Add Exception | Confirm Security Exception, but then next time I run the script I get the same result.
I found some suggestions on line. I manually started Firefox, added the Security Exception and located the profile, which appears to be:
C:\Users\fhankey\AppData\Local\Mozilla\Firefox\Profiles\gppuxlji.default
I modified my script to reference this profile.
fp = webdriver.FirefoxProfile('C:\Users\\fhankey\AppData\Local\Mozilla\Firefox\Profiles\gppuxlji.default')
fpsetting = fp.accept_untrusted_certs
driver = webdriver.Firefox(fp)
driver.implicitly_wait(30)
driver.get("https://<my internal ip>")
This gets me to the main screen (progress), but when my script executes the next steps:
try:
element = WebDriverWait(driver, 2).until(EC.presence_of_element_located((By.LINK_TEXT, "QA Trunk (QA_Release_V130)")))
finally:
# the page is ajaxy so the title is originally this:
print driver.title
driver.find_element_by_link_text("QA Trunk (QA_Release_V130)").click()
I get another "connection is not secure". I can manually clear this, but it happens every time. Is there a way around this?
Thanks