Skip to content

Commit

Permalink
Add missing mouseover for select and radio elements before click.
Browse files Browse the repository at this point in the history
  • Loading branch information
vever001 committed Aug 10, 2024
1 parent 145fe8e commit c36aada
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Selenium2Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -1230,7 +1230,7 @@ private function selectRadioValue(Element $element, string $value): void
throw new DriverException($message, 0, $e);
}

$input->click();
$this->clickOnElement($input);
}

/**
Expand All @@ -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()) {
Expand Down

0 comments on commit c36aada

Please sign in to comment.