【问题标题】:Experiencing issue with robot framework while executing on windows operating system在 Windows 操作系统上执行时遇到机器人框架问题
【发布时间】:2022-12-29 03:11:23
【问题描述】:

在 Windows 操作系统中遇到机器人框架问题。 代码:

*** settings ***
Library  SeleniumLibrary

*** variables ***

*** test cases ***
This is simple test case
    [documentation]  Google test
    [tags]  Regression

    open Browser  https://www.google.com  chrome  
    close Browser

*** keywords ***
Error: [WebDriverException: Message: 'chromedriver' executable needs to be in PATH.
Please see https://chromedriver.chromium.org/home]

【问题讨论】:

    标签: exception selenium-chromedriver robotframework


    【解决方案1】:

    你需要在这里下载ChromeDriver:https://sites.google.com/chromium.org/driver/

    然后将它添加到您的系统 PATH(内部系统环境变量),您可以使用 Windows 搜索来搜索它。

    或者您可以直接通过 executable_path 指定位置

    driver = webdriver.Chrome(executable_path='C:/path/to/chromedriver.exe')
    

    【讨论】:

      猜你喜欢
      • 2021-05-19
      • 2020-11-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-10
      相关资源
      最近更新 更多