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%
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)
- At the same time attach a source of inspiration: Stack Overflow