我正在使用 Codeception 进行验收测试。在我的本地电脑上,使用 selenium 和 chromedriver 运行测试没有问题。直到 1 周,它在我的 git 上也能正常工作,但现在出现了这个错误。
“[PHPUnit\Framework\Exception] 未定义索引:ELEMENT”
本地它工作正常,没有错误。
我已经搜索了这个错误并找到了一个提示,我必须用“-enablepassthrough false”启动 selenium。但这并不真正有效。
在 1 周之前使用所有相同的设置,它工作正常。
这是我的acceptance.suite.yml:
actor: AcceptanceTester
modules:
enabled:
- WebDriver:
url: 'https://website.com'
host: 'selenium__standalone-chrome'
port: 4444
browser: chrome
window_size: 1920x1080
最佳答案
对于 Chrome/ChromeDriver v79 设置 w3c
至 false
在 acceptance.suite.yml
帮助:
modules:
enabled:
- WebDriver:
capabilities:
chromeOptions:
w3c: false
关于php - Codeception 未定义索引 : ELEMENT error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56556709/