首页 > 代码库 > 解决问题 WebDriverException: Message: unknown error: cannot find Chrome binary

解决问题 WebDriverException: Message: unknown error: cannot find Chrome binary

通过jenkins来执行RobotFramework的脚本, 在执行机命令行中运行是完全OK的, 而通过jenkins执行相应的命令就提示下面的错误:

单项预订                                                                      
==============================================================================
单项预订.测试用例                                                             
==============================================================================
单项预订.测试用例.01 景点(多票种非对接)                                     
==============================================================================
预订基本流                                                            [ WARN ] Keyword ‘Capture Page Screenshot‘ could not be run on failure: No browser is open
| FAIL |
WebDriverException: Message: unknown error: cannot find Chrome binary
  (Driver info: chromedriver=2.29.461591 (62ebf098771772160f391d75e589dc567915b233),platform=Windows NT 6.1.7601 SP1 x86_64)



折腾了一天之后,终于找着原因,,,

我的Chrome不知道为啥安装到C盘的User目录里面,卸载后重新安装,安装在C盘的Program Files (x86)目录下, 再次通过jenkins执行, 完美运行。

解决问题 WebDriverException: Message: unknown error: cannot find Chrome binary