Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #389 +/- ##
============================================
+ Coverage 85.82% 85.91% +0.08%
- Complexity 184 185 +1
============================================
Files 1 1
Lines 501 504 +3
============================================
+ Hits 430 433 +3
Misses 71 71 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| { | ||
| $this->executeJsOnElement( | ||
| $element, | ||
| "arguments[0].scrollIntoView({ behavior: 'instant', block: 'end', inline: 'nearest' });" |
There was a problem hiding this comment.
shouldn't we use nearest as well in the block direction ?
There was a problem hiding this comment.
I don't use the scrollIntoView method myself. I've only copied the whole line from the PHP WebDriver (see https://github.com/php-webdriver/php-webdriver/blob/11923b4ba312fc9d137266ae67438be65d4d500f/lib/Remote/RemoteWebElement.php#L249 ). I trust that they know what's right here.
There was a problem hiding this comment.
@stof, my point here is still valid. I think this driver should scroll to an element exactly the same as the underlying facebook web driver does for webdriver-classic-driver driver.
b6823ea to
a65aa40
Compare
|
Not merging yet, because I think we need to add a missing test in driver-testsuite. |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
a65aa40 to
65652da
Compare
Using the
movetoWebDriver command the Firefox will trigger an\WebDriver\Exception\MoveTargetOutOfBoundsexception when the element is outside of the viewport:The
movetocommand is used in these driver methods:clickOnElementclick(doesclickOnElementinternally)check(doesclickOnElementinternally)uncheck(doesclickOnElementinternally)setValue(checkboxes only; doesclickOnElementinternally)mouseOverrightClick(doesmouseOverinternally)doubleClick(doesmouseOverinternally).
The test suite isn't testing mouse-related operations (listed above) outside of the viewport.
P.S.
movetoautomatically adjusts the viewport.