标签:nbsp except word col drivers webdriver csdn 系统 driver
详细描述:想用ie浏览器来执行测试用例,按照官方文档http://code.google.com/p/selenium/wiki/IEDriver 的步骤操作后还是报WebDriverException: Message: ‘IEDriverServer.exe‘ executable needs to be in PATH的错,配了系统环境变量重启后也没用。
用下面这种方法设环境变量就可以:
import os from selenium import webdriver iedriver = "F:\My\Software\IEDriverServer_x64_3.141.0\IEDriverServer.exe" os.environ["webdriver.ie.driver"] = iedriver driver = webdriver.Ie(iedriver) #driver = webdriver.Ie() driver.get(‘https://www.baidu.com/‘)
WebDriverException: Message: 'IEDriverServer.exe' executable needs to be in PATH.
标签:nbsp except word col drivers webdriver csdn 系统 driver
原文地址:https://www.cnblogs.com/blueteer/p/10390429.html