0
我想从selenium 2的下拉菜单中选择一个项目,并结合phpunit。我使用的类是PHPUnit_Extensions_Selenium2TestCase。我知道在硒1它是:select index selenium 2 php
$this->select("id=dt-general-input", "index=3");
但如何将此转换为硒2?要选择你要做的元素:
$ this-> select($ this-> byId(“dt-general-input”));
但我该如何选择第三个索引?此选择没有(文本)标记的选项。所以我不能使用$this->select($this->byId("dt-general-input"))->selectOptionByValue(3);
感谢您的指针。方法options()对于Selenium 2来说似乎不可用。但是我可以使用selectOptionLabels()和selectOptionValues()来代替。 – user3379159