The input element is always hidden, so the check always ended falling
back to the label. Moreover, the label is the element that the user
interacts with, so it must be the one used.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* @Given I toggle the :id checkbox in the settings
*/
public function iToggleTheCheckboxInTheSettingsTo($id) {
- $locator = self::CheckboxInTheSettings($id);
-
- // If locator is not visible, fallback to label
- if (!$this->actor->find(self::CheckboxInTheSettings($id), 10)->isVisible()) {
- $locator = self::checkboxLabelInTheSettings($id);
- }
-
- $this->actor->find($locator, 10)->click();
+ $this->actor->find(self::checkboxLabelInTheSettings($id), 10)->click();
}
/**