Json 使用w3c webdriver api启动chromedriver会话
我正在尝试使用chromedriver和w3c webdriver API启动Chrome会话,我向Json 使用w3c webdriver api启动chromedriver会话,json,rest,selenium-chromedriver,w3c,web-testing,Json,Rest,Selenium Chromedriver,W3c,Web Testing,我正在尝试使用chromedriver和w3c webdriver API启动Chrome会话,我向http://localhost:9515/session与车身一起使用 { "capabilities": { "alwaysMatch": { "platformName": "linux", "chrome:browserOptions": { "binary": "/usr/bin/ch
http://localhost:9515/session
与车身一起使用
{
"capabilities": {
"alwaysMatch": {
"platformName": "linux",
"chrome:browserOptions": {
"binary": "/usr/bin/chromium",
"args": ["--start-page=about:blank"]
}
},
"firstMatch": [
{"browserName": "chrome"}
]
}
}
我得到了下一个回应
{
"sessionId": "b1a413df152017cd223dbabbcf1d2ffe",
"status": 33,
"value": {
"message": "session not created exception: Missing or invalid capabilities (Driver info: chromedriver=2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7),platform=Linux 4.14.47-1-MANJARO x86_64)"
}
}
哪些功能缺失或无效?chromedriver(至少从2.41版开始)根本不支持W3C WebDriver API
chromedriver缺少的功能是功能。alwaysMatch.goog:chromeOptions.w3c:true
,即
{“能力”:{“alwaysMatch”:{“goog:chromeOptions”:{“w3c:true}}}
这是chromedriver的缺陷。如果您想尝试W3C WebDriver协议,可以使用geckodriver
(firefox),它几乎完美地支持W3C WebDriver API。chromedriver(至少从2.41版开始)根本不支持W3C WebDriver API
chromedriver缺少的功能是功能。alwaysMatch.goog:chromeOptions.w3c:true
,即
{“能力”:{“alwaysMatch”:{“goog:chromeOptions”:{“w3c:true}}}
这是chromedriver的缺陷。如果您想尝试W3C WebDriver协议,可以使用geckodriver
(firefox),它几乎完美地支持W3C WebDriver API。Java代码:
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("w3c", true);
new ChromeDriver(options);
Java代码:
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("w3c", true);
new ChromeDriver(options);
另请参阅Chromium中的WebDriver命令支持。另请参阅Chromium中的WebDriver命令支持。