Selenium webdriver 如何在codeception中为远程chromedriver指定“二进制”路径?

Selenium webdriver 如何在codeception中为远程chromedriver指定“二进制”路径?,selenium-webdriver,codeception,selenium-chromedriver,Selenium Webdriver,Codeception,Selenium Chromedriver,我正在尝试使用带有codeception的远程chromedriver。我目前可以连接到chromedriver,因为如果我不启动它,在长时间超时后会出现另一个错误。但是,chromedriver无法在该windows虚拟机上启动chrome,因为它没有安装在搜索路径中。我试图覆盖它,但找不到为该选项设置codeception的方法 以下是我在acceptance.suite.yml中尝试的内容: WebDriver: host: 10.0.15.15 port:

我正在尝试使用带有codeception的远程chromedriver。我目前可以连接到chromedriver,因为如果我不启动它,在长时间超时后会出现另一个错误。但是,chromedriver无法在该windows虚拟机上启动chrome,因为它没有安装在搜索路径中。我试图覆盖它,但找不到为该选项设置codeception的方法

以下是我在acceptance.suite.yml中尝试的内容:

WebDriver: host: 10.0.15.15 port: 9515 url: 'http://www.box.dev' browser: 'chrome' capabilities: binary: "C:\\\\Program Files (x86)\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe"
我用\\\\\\和/,尝试了一些二进制格式的变体。Chrome就是不出现。。。chromedriver没有太多输出,所以我对这一点有点盲目…

chromedriver应该在主机系统上运行。您必须使用一个选项启动selenium,该选项表示chromedriver.exe所在的selenium

java -jar selenium-server-standalone-2.41.0.jar -role node -hub http://www.box.dev:9515/register/grid Dwebdriver.chrome.driver="C:/Users/me/Downloads/chromedriver.exe"

然后,您只需在codeception配置中说明您想要使用浏览器chrome,它应该安装在那里。

在Windows上为我工作的acceptance.suite.yml如下所示

capabilities:
    chromeOptions:
        args: ["disable-infobars", "headless","disable-gpu", "window-size=1920x1080"]
        binary: "C:/Users/***/chrome.exe"