From c36aada9b4f3a9f0418020db19d4409215c331ca Mon Sep 17 00:00:00 2001 From: Herve Donner Date: Sat, 10 Aug 2024 16:07:26 +0200 Subject: [PATCH] Add missing mouseover for select and radio elements before click. --- src/Selenium2Driver.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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()) {