.scrollIntoView()
and .click()
failures: "The action target (<html node>) is located outside the layout viewport."
#8371
Labels
STATE: Need response
An issue that requires a response or attention from the team.
TYPE: bug
The described behavior is considered as wrong (bug).
What is your Scenario?
I'm experiencing intermittent test failures with
.click
and.scrollIntoView
actions. Many test runs are fine, but once these failures start to get going in a test run, I'm experiencing multiple (in various tests).The
.click
actions are clicking a<a>
link which is slightly below the viewport.The
.scrollIntoView
action is included in a test to scroll down to a specific paragraph in a long text document. This one surprises me the most, since this API method is specifically used to scroll the webpage until the element is in the viewport.What is the Current behavior?
Tests intermittently failing.
What is the Expected behavior?
Tests always passing. When an element is out of view, I expect the page to automatically scroll to the target element before interacting with it, as stated on https://testcafe.io/documentation/403067/reference/test-api/testcontroller/scrollintoview.
What is the public URL of the test page? (attach your complete example)
Not public.
What is your TestCafe test code?
I also wrote a custom function to scroll a selector into view before clicking it, but also this intermittently fails on the
.scrollIntoView
action:Your complete configuration file
No response
Your complete test report
Screenshots
No response
Steps to Reproduce
.scrollIntoView
and.click
actionsTestCafe version
3.7.0
Node.js version
v23.6.1
Command-line arguments
npx testcafe chrome:headless tests/test.js
Browser name(s) and version(s)
Chrome 132.0.0.0
Platform(s) and version(s)
macOS 10.15.7
Other
No response
The text was updated successfully, but these errors were encountered: