Python calls IE11 browser error solution through selenium

premise

Install the Python tool normally, and the selenium package can be imported normally. The IE browser driver IEDriverServer.exe has been correctly placed under the file that has been added to the path directory.

insert image description here

Error phenomenon:

insert image description here

Solution

Open your browser and go to internet options

Switch to the Security tab and remove "Apply Protected Mode"

insert image description here

insert image description here

insert image description here

Call verify again:

insert image description here

No error, problem solved

Attached test code:

from selenium import webdriver

driver = webdriver.Ie()

driver.get('http://www.baidu.com')

print(driver.title)

Solution original text:

Official solution:

https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver#required-configuration

Finally: In order to give back to the die-hard fans, I have compiled a complete software testing video learning tutorial for you. If you need it, you can get it for free【保证100%免费】
insert image description here

Software Testing Interview Documentation

We must study to find a high-paying job. The following interview questions are the latest interview materials from first-tier Internet companies such as Ali, Tencent, and Byte, and some Byte bosses have given authoritative answers. Finish this set The interview materials believe that everyone can find a satisfactory job.

insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/m0_67695717/article/details/131462995