Reputation: 5056
I am trying to set up assertion for unchecked checkbox. Checked assertion works fine when I use:
$this->assertChecked('css=#element', true);
When I want to test unchecked chekbox with
$this->assertChecked('css=#element', false);
I get this error:
Failed command: assertChecked('css=#element', '')
Failed asserting that false is true.
Upvotes: 0
Views: 354
Reputation: 1737
1.assertChecked ( locator )
- true if the checkbox is checked, false otherwise
2.assertNotChecked ( locator )
- true if the checkbox is unchecked, false otherwise
http://release.seleniumhq.org/selenium-core/1.0.1/reference.html
Upvotes: 2