Skip to content

Commit

Permalink
Use property only for w3c mode
Browse files Browse the repository at this point in the history
  • Loading branch information
justafish committed Feb 6, 2024
1 parent b1257d2 commit 9820e09
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Selenium2Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,12 @@ public function setValue(string $xpath, $value)
$element->postValue(array('text' => Key::DELETE));
}
else {
$existingValueLength = strlen($element->property('value'));
if ($this->isW3C()) {
$existingValueLength = strlen($element->property('value'));
}
else {
$existingValueLength = strlen($element->attribute('value'));
}
$value = str_repeat(Key::BACKSPACE . Key::DELETE, $existingValueLength) . $value;
}
}
Expand Down

0 comments on commit 9820e09

Please sign in to comment.