selenium相关学习内容

191 阅读1分钟

webdriver

step1:webdriver下载地址

webdriver下载地址

根据Chrome浏览器的版本选择webdriver版本

image.png

step2:webdriver存储路径

将下载后解压的exe文件放在目录C:\Program Files (x86)\Google\Chrome\Application

step3:配置环境变量

在Path后加入路径

image.png

验证webdriver安装成功

cmd中输入chromedriver验证安装是否成功

image.png

如果按照以上方式配置webdriver后,仍无法运行case,将webdriver的exe文件放到对应的python的安装目录下的Scripts中试一下

运行case时报错:SessionNotCreatedException,可能是webdriver下载版本错误。