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
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?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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?
Beta Was this translation helpful? Give feedback.
All reactions