我正在尝试为未选中的复选框设置断言。当我使用时,检查断言工作正常:
$this->assertChecked('css=#element', true);
当我想测试未选中的复选框时
$this->assertChecked('css=#element', false);
我收到此错误:
Failed command: assertChecked('css=#element', '')
Failed asserting that false is true.
1. assertChecked ( locator )
- 如果复选框被选中,则为 true,否则为 false
2. assertNotChecked ( locator )
- 如果复选框未选中,则为 true,否则为 false
http://release.seleniumhq.org/selenium-core/1.0.1/reference.html