@TOC

1、IE驱动问题

1.1、问题景象

selenium.common.exceptions.WebDriverException: Message: 'IEDriverServer.exe' executable needs to be in PATH. Please download from http://selenium-release.stora... and read up at https://github.com/SeleniumHQ... Exception ignored in: <bound method Service.__del__ of <selenium.webdriver.ie.service.Service object at 0x000001541A09C1D0>>

1.2、剖析

从问题看,应该是IE驱动有问题,从新下载安装selenium对应的IE驱动
下载地址如下:
http://npm.taobao.org/mirrors/selenium

1.3、驱动调用

①个别状况放在ie浏览器的装置地位,而后把门路退出零碎环境变量即可;
②如果第一种不行,须要把驱动放在Python的装置目录下即可。

2、IE缩放比问题

2.1、问题景象

selenium.common.exceptions.WebDriverException: Message: Unexpected error launching Internet Explorer

2.2、剖析

这个是因为IE缩放比影响,须要把缩放比设置为100%

2.3、解决

把缩放比设置为100%,即可

3、平安设置问题

3.1、问题景象

WebDriverException: Message: u'Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones. Enable Protected Mode must be set to the same value (enabled or disabled) for all zones.'

3.2、剖析

这个是因为IE的平安设置导致的

3.3、解决

① 进入IE设置中internet选项,

②把以下四个选项全副勾销勾选 或者 全副勾选上,必须放弃对立

4、窗口和标签的问题

4.1、问题景象

具体错误代码遗记 了,不过粗心是:selenium找这个元素的时候,窗口被敞开了

4.2、剖析

其实问题是,浏览器选项卡的问题,每次关上的时候,关上了新的选项卡或者新的窗口

4.3、解决

① 第一步,勾选如下:

② 第二步,平安--自定义级别,禁用smartscreen

③ 第三步,高级,勾选如下:

④ 如果以上步骤还是不行,重置浏览器后,再次执行①②③步骤即可
重置的步骤为: