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
After changing the viewport values (using cy.viewport(600,400) command), I tried to retrieve these values from Cypress.config('viewportWidth') , but it keeps returning the default configuration, see code below
Current behavior
After changing the viewport values (using
cy.viewport(600,400)
command), I tried to retrieve these values fromCypress.config('viewportWidth')
, but it keeps returning the default configuration, see code belowDesired behavior
Cypress should provide a method that gives back the current viewport width and height.
Test code to reproduce
Here is a repo where to reproduce the failing test
https://github.com/yam-exerp/cypress-test-tiny
Cypress Version
14.0.0
Node version
v18.20.4
Operating System
MacOS Version 15.0.1
Debug Logs
Other
It seems that this issue was raised before but was closed because of a long period of inactivity
#22688
https://stackoverflow.com/questions/75115796/why-is-cy-viewportwidth-height-not-updating-screen-size
The text was updated successfully, but these errors were encountered: