selenium操作ie浏览器,打开之后没有反应,不会请求url
from selenium import webdriverdriver = webdriver.Ie(executable_path="g:\\IEDriverServer.exe")driver.get("")driver.switch_to.frame(driver.find_element_by_xpath("//iframe[contains(@id,'x-URS-iframe')]"))mail = driver.find_element_by_xpath("//input[@data-type='email']")mail.send_keys('chen050706')
错误提示:
mon.exceptions.WebDriverException: Message: Unexpected error launching Internet Explorer. Browser zoom level was set to 75%. It should be set to 100%
原因分析:
selenium操作ie时,浏览器缩放比例必须为100%,否则就会出现这个错误。将ie的缩放比例设置为100%,即可解决这个问题,再跑代码可以正常运行