我有场景
/**
* @Then I click on suggestion element
*/
public function iClickOnSuggestionElement()
{
$el = $this->getSession()->getPage()
->find('css', '.autocomplete-suggestion[data-index=0]');
if(!$el){
throw new Exception('Element not found!');
}
$el->click();
}
当我运行behat测试时我得到错误: 使用参数将http POST发送到http://localhost:4444/wd/hub/session/b0903fe0-1327-4833-b4fc-ee52ac8bac29/moveto的卷曲错误:{"元素":" 7"}
The requested URL returned error: 500 Internal Server Error (WebDriver\Exception\CurlExec)
我想这是因为 - > find(' css')
default:
suites:
guest_features:
paths: [ %paths.base%/features/web ]
filters: { role: guest }
contexts: [ GuestContext ]
user_features:
paths: [ %paths.base%/features/web ]
filters: { role: member }
contexts: [ MemberContext ]
groupled_features:
paths: [ %paths.base%/features/web ]
filters: { role: grouplead}
contexts: [ GroupleadContext ]
admin_features:
paths: [ %paths.base%/features/web ]
filters: { role: admin }
contexts: [ AdminContext ]
extensions:
Behat\MinkExtension:
base_url: someUrl
browser_name: firefox
selenium2:
capabilities: { "browser": "firefox", "version": "24"}
goutte: ~
我使用selenium-server-standalone-2.45.0
p / s我已经发现熟悉的问题(https://github.com/minkphp/MinkSelenium2Driver/issues/200),但降级浏览器的版本并没有产生影响。
提前致谢!
答案 0 :(得分:0)
功能:{“浏览器”:“firefox”,“版本”:“24”}
你正在使用这样一个旧版本的Firefox?你应该考虑firefox,firefoxdriver和selenium的兼容性。如果您使用的是selenium 2.45.0,那么您需要最新的firefox版本和最新的firefox驱动程序。