• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
金大鑫要坚持
博客园    首页    新随笔    联系   管理    订阅  订阅

Selenium Edge Driver Python 自动化测试

Finally I got it.

没有自动化过edge,今天被小坑了一下,但是还好现在弄好了。

1. 查看edge 版本,我的是14.14393

 

2. https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ 下载edge driver。一定要下载support version的driver哦,否则你单独运行webdriver就会提示你这个版本不匹配。

 

C:\Users\***\Downloads>MicrosoftWebDriver.exe
This version of MicrosoftWebDriver.exe is not compatible with the installed version of Windows 10.
For more information, visit http://aka.ms/webdriver

 直接跑test报的错我也贴过来,免的有人跟我一样,他说检测assert_process_still_running 有问题,其实还是driver不匹配~ 大家要注意哦~

ft1.1: <subprocess.Popen object at 0x03A188F0>
<subprocess.Popen object at 0x03A188F0>
Traceback (most recent call last):
  File "C:\Users\***\Desktop\first_webdriver.py", line 15, in setUp
    self.driver = webdriver.Edge("c:/users/***/downloads/MicrosoftWebDriver.exe")
  File "C:\Python27\lib\site-packages\selenium\webdriver\edge\webdriver.py", line 34, in __init__
    self.edge_service.start()
  File "C:\Python27\lib\site-packages\selenium\webdriver\common\service.py", line 96, in start
    self.assert_process_still_running()
  File "C:\Python27\lib\site-packages\selenium\webdriver\common\service.py", line 110, in assert_process_still_running
    % (self.path, return_code)
WebDriverException: Message: Service c:/users/***/downloads/MicrosoftWebDriver.exe unexpectedly exited. Status code was: 1
posted @ 2018-01-18 13:22  金大鑫要坚持  阅读(9073)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3