Selenium start IE browser error: Message:. Unexpected error launching Internet Explorer Browser zoom level

I. Description of the problem

Start IE browser with Selenium, IE prompted zoom level error, it must be 100%

Message: Unexpected error launching Internet Explorer.
 Browser zoom level was set to 250%. It should be set to 100%

Second, the solution

Here are two methods, I recommend the second, otherwise I write this blog is pointless

1, modify IE browser settings

You go to Baidu This approach is most common , will modify the zoom to 100%
Here Insert Picture Description

2, code implementation

The first method is really in trouble, then restart your browser settings resumed. And I think as a programmer must go through the code for control applications, the repair method is set very low.

  • Selenium comes with a method, ignore the browser's zoom to achieve normal start browser
cap = Options()
cap.ignore_zoom_level = True
driver = webdriver.Ie(options=cap)

Published 59 original articles · won praise 6 · views 10000 +

Guess you like

Origin blog.csdn.net/qq_27009225/article/details/104639180
Recommended