I'm trying to automate the process of logging into a Sharepoint folder and downloading some files. I get past the username stage, then I receive a popup window asking me to select a certiciate for login. The browser tab then pinwheels and when I close it, I get the below error message.
"Traceback (most recent call last):
File ".\CSSDownloads.py", line 17, in <module>
driver.switch_to_alert.accept()
AttributeError: 'function' object has no attribute 'accept'"
I tried the below code:
driver.find_element_by_id("certauth").click()
driver.implicitly_wait(3)
elem = driver.find_element_by_xpath("/html/body/script[1]")
elem.send_keys(Keys.RETURN)
And the below:
driver.find_element_by_id("certauth").click()
driver.implicitly_wait(3)
driver.switch_to_alert.accept()
Normally I'd expect either of the above to progress to the Sharepoint page I'm looking for, but my browser seems to just wait for the next action until I close it and I see the above error message in Powershell.