You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a page contains more than one dropdown that contains the same option value, the specificity of the selector is not granular enough to pick the right option. The "element" parameter that gets passed through to the select method is completely ignored by the Selenium component, and it just looks for an option with the provided value.
This works fine when that option value is unique on the page, but otherwise can lead to incorrect behaviour. To resolve this, I've overridden the select method to be the following:
public function select($element, $option)
{
$this->findByNameOrId($element)->element('css selector', "option[value='{$option}']")->click();
return $this;
}
The text was updated successfully, but these errors were encountered:
If a page contains more than one dropdown that contains the same option value, the specificity of the selector is not granular enough to pick the right option. The "element" parameter that gets passed through to the select method is completely ignored by the Selenium component, and it just looks for an option with the provided value.
This works fine when that option value is unique on the page, but otherwise can lead to incorrect behaviour. To resolve this, I've overridden the select method to be the following:
The text was updated successfully, but these errors were encountered: