diff --git a/src/Selenium2Driver.php b/src/Selenium2Driver.php index 463479be..2eaa9184 100755 --- a/src/Selenium2Driver.php +++ b/src/Selenium2Driver.php @@ -1188,7 +1188,7 @@ private function selectRadioValue(Element $element, string $value): void { // short-circuit when we already have the right button of the group to avoid XPath queries if ($element->attribute('value') === $value) { - $element->click(); + $this->clickOnElement($element); return; } @@ -1230,7 +1230,7 @@ private function selectRadioValue(Element $element, string $value): void throw new DriverException($message, 0, $e); } - $input->click(); + $this->clickOnElement($input); } /** @@ -1242,6 +1242,7 @@ private function selectOptionOnElement(Element $element, string $value, bool $mu // The value of an option is the normalized version of its text when it has no value attribute $optionQuery = sprintf('.//option[@value = %s or (not(@value) and normalize-space(.) = %s)]', $escapedValue, $escapedValue); $option = $element->element('xpath', $optionQuery); + $this->doMouseOver($element); if ($multiple || !$element->attribute('multiple')) { if (!$option->selected()) {