- 博客(5)
- 收藏
- 关注
原创 MicrosoftWebDriver.exe‘ executable needs to be in PATH.
将edge的驱动放在Python的安装目录中。然后使用selenium驱动Edge的时候,报如下错误:Edge的驱动需要添加到path中,也就是需要添加到环境变量中,我添加后依然不能解决问题,1.可以通过加上edge驱动的绝对路径解决了问题2.因为微软默认的文件名不一样,可以将下载的程序名字改为MicrosoftWebDriver.exe...
2021-12-20 21:13:37 2781
原创 selenium 通过chrome浏览器携带用户数据登录网站
selenium 携带用户数据chromedriver登录网站1.在chrome浏览器数据Chrome://versin会得到本地谷歌用户数据:如图2.启动chromeDriver需要添加user_data_dir 目录,这里只写到User Data 目录。option = webdriver.ChromeOptions()user_data_dir=r'C:\Users\12501\AppData\Local\Google\Chrome\User Data' #这里只写到User Data 目
2021-12-17 15:50:00 2090
原创 pycharm 的‘‘‘ ‘‘‘三引号注释不能直接写目录地址 ‘‘‘ ^ SyntaxError:
pycharm运行python代码报错如下: File "E:/test.py", line 10 ''' ^SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 7-8: truncated \UXXXXXXXX escapeProcess finished with exit code 1而后定位到写了三引号注释,注释里面写的:''' C:\Users\s
2021-12-17 14:58:06 950
原创 解决python3配置常见错误 selenium3之Firefox geckodriver
第一个坑:’geckodriver’ executable needs to be in PATH1.如果启动浏览器过程中报如下错误Traceback (most recent call last):File "", line 1, in File "D:\test\python3\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 145, in __init__self.service.start()File "D:\te
2021-12-17 12:47:26 536
原创 Selenium + PhantomJS时报“‘phantomjs.exe‘ executable needs to be in PATH.”
PhantomJS环境变量已经配置,执行代码driver=webdriver.PhantomJS()还是报错:“WebDriverException: Message: ‘phantomjs.exe’ executable needs to be in PATH.”的错误。此时,除了在“此电脑>属性>高级系统设置>高级>环境变量>系统变量>Path”里添加phantomjs.exe的解压路径E:\phantomjs-2.1.1-windows\bin\以外,还需要
2021-12-16 23:03:26 1003
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人