脚本宝典收集整理的这篇文章主要介绍了php – 无法使用多个方法参数调用命令,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
Exception: You cannot call a command with multiple method arguments.
在http://phpunit.de/manual/3.7/en/selenium.html,它显示使用情况:
void assertElementValueEquals(string $locator,string $text)
当我打电话给它时
$this->assertElementValueEquals( 'id=date_1_formatted','2013-01-01' );
每次测试都会产生上述错误,即使这种格式似乎适用于其他问题,例如问题Using PHPUnit with Selenium,how can I test that an element contains exactly something?
此外,你使用了正确的结构与$this-> byxpath,就像这里https://github.com/sebastianbergmann/phpunit-selenium/blob/master/Tests/Selenium2TestCaseTest.php
您也可以使用$this-> byId():
$element = $this->byId('date_1_formatted'); $this->assertEquals('2013-01-01',$element->value());
P. S.:如果您熟悉Selenium IDE,可以试试这个command line tool.
以上是脚本宝典为你收集整理的php – 无法使用多个方法参数调用命令全部内容,希望文章能够帮你解决php – 无法使用多个方法参数调用命令所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。