StrikekitStrikekit

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

QualifierRoleExample
toViewport width in pixelsresize to "375" by "812"
byViewport height in pixelsresize 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: api return unsupported.

On this page