resize
Set the browser viewport width and height
Set the Playwright viewport size. Both width and height must be positive integers.
Syntax
When I resize to "<width>" by "<height>"Qualifiers
| Qualifier | Role | Example |
|---|---|---|
to | Viewport width in pixels | resize to "375" by "812" |
by | Viewport height in pixels | resize to "375" by "812" |
by here is not a find hint — it pairs with to for height. Find hints use by aria-label / by id / … — see Find hints.
Examples
When I resize to "375" by "812"Notes
- Web only. Appium /
Platform: apireturn unsupported.