You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by AfafRH19 December 5, 2024
Hey everyone!
I’m encountering some issues with the viewport since upgrading WebDriver to version 130.0.6723.69.
I have an integration test with a component that has the class "map-container." We used the following function to check if the component is within the viewport:
def in_viewport?(element, top_margin = 0)
evaluate_script(
"(function(el) {
var rect = el.getBoundingClientRect();
return (
rect.top >= #{top_margin} && rect.left >= 0 &&
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
rect.right <= (window.innerWidth || document.documentElement.clientWidth)
);
})(arguments[0]);",
element
)
end
However, since the recent upgrade, this check always returns false when running in HEADLESS mode. Any insights or suggestions on how to resolve this?
The text was updated successfully, but these errors were encountered:
Discussed in https://github.com/orgs/teamcapybara/discussions/2787
Originally posted by AfafRH19 December 5, 2024
Hey everyone!
I’m encountering some issues with the viewport since upgrading WebDriver to version 130.0.6723.69.
I have an integration test with a component that has the class "map-container." We used the following function to check if the component is within the viewport:
def in_viewport?(element, top_margin = 0)
evaluate_script(
"(function(el) {
var rect = el.getBoundingClientRect();
return (
rect.top >= #{top_margin} && rect.left >= 0 &&
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
rect.right <= (window.innerWidth || document.documentElement.clientWidth)
);
})(arguments[0]);",
element
)
end
However, since the recent upgrade, this check always returns false when running in HEADLESS mode. Any insights or suggestions on how to resolve this?
The text was updated successfully, but these errors were encountered: