无法在 codeception 中使用使用 Selenium webdriver 的 Chrome 浏览器
Unable to work with Chrome browser using Selenium webdriver in codeception
用这个命令启动 selenium + chrome 驱动程序
java -Dwebdriver.chrome.driver=chromedriver.exe -jar selenium.jar
它启动服务器
这是我的 acceptance.suite.yml 文件
class_name: AcceptanceTester
modules:
enabled:
- WebDriver:
url: ''
browser: chrome
window_size: 1280x768
curl:
CURLOPT_TIMEOUT: 60
这是我在尝试执行测试用例时收到的错误消息
[Facebook\WebDriver\Exception\UnknownServerException]
unknown error: cannot parse capability: proxy
from unknown error: must be a dictionary
(Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Windows NT 6.2 x86_64) (WARNING: The server d
id not provide any stacktrace information)
Command duration or timeout: 518 milliseconds
Build info: version: '2.52.0', revision: '4c2593c', time: '2016-02-11 19:06:42'
System info: host: 'FR301-216', ip: '172.16.102.106', os.name: 'Windows 8', os.arch: 'amd64', os.version: '6.2', java.version: '1.8.0_65'
Driver info: org.openqa.selenium.chrome.ChromeDriver
这是新codeception版本(2.1.5及以上)中存在的bug。解决方法是将你的codeception版本降级到2.1.4.
用这个命令启动 selenium + chrome 驱动程序
java -Dwebdriver.chrome.driver=chromedriver.exe -jar selenium.jar
它启动服务器
这是我的 acceptance.suite.yml 文件
class_name: AcceptanceTester
modules:
enabled:
- WebDriver:
url: ''
browser: chrome
window_size: 1280x768
curl:
CURLOPT_TIMEOUT: 60
这是我在尝试执行测试用例时收到的错误消息
[Facebook\WebDriver\Exception\UnknownServerException]
unknown error: cannot parse capability: proxy
from unknown error: must be a dictionary
(Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Windows NT 6.2 x86_64) (WARNING: The server d
id not provide any stacktrace information)
Command duration or timeout: 518 milliseconds
Build info: version: '2.52.0', revision: '4c2593c', time: '2016-02-11 19:06:42'
System info: host: 'FR301-216', ip: '172.16.102.106', os.name: 'Windows 8', os.arch: 'amd64', os.version: '6.2', java.version: '1.8.0_65'
Driver info: org.openqa.selenium.chrome.ChromeDriver
这是新codeception版本(2.1.5及以上)中存在的bug。解决方法是将你的codeception版本降级到2.1.4.