Skip to content

feat(webdriverio): new command to set viewport#13258

Merged
christian-bromann merged 4 commits intomainfrom
cb/setViewport-command
Aug 6, 2024
Merged

feat(webdriverio): new command to set viewport#13258
christian-bromann merged 4 commits intomainfrom
cb/setViewport-command

Conversation

@christian-bromann
Copy link
Member

Proposed changes

With WebDriver Bidi we now have a browsingContextSetViewport command that allows to set the browser viewport, making it easier to emulate mobile screens as it supports e.g. devicePixelRatio. This command is useful enough to be elevated from the protocol command list into a standalone command with parameter validation.

Types of changes

  • Polish (an improvement for an existing feature)
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (improvements to the project's docs)
  • Specification changes (updates to WebDriver command specifications)
  • Internal updates (everything related to internal scripts, governance documentation and CI files)

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation (if appropriate)
  • I have added proper type definitions for new commands (if appropriate)

Backport Request

//: # (The current main branch is the development branch for WebdriverIO v9. If your change should be released to the current major version of WebdriverIO (v8), please raise another PR with the same changes against the v8 branch.)

  • This change is solely for v9 and doesn't need to be back-ported
  • Back-ported PR at #XXXXX

Further comments

n/a

Reviewers: @webdriverio/project-committers

@christian-bromann christian-bromann added the PR: New Feature 🚀 PRs that contain new features label Aug 3, 2024
@christian-bromann christian-bromann merged commit bd9167c into main Aug 6, 2024
@christian-bromann christian-bromann deleted the cb/setViewport-command branch August 6, 2024 02:17
johnp added a commit to johnp/webdriverio that referenced this pull request Aug 11, 2024
…-leak

* upstream/main:
  V9 ai support (webdriverio#13340)
  docs(devtools manipulation): (webdriverio#13334)
  breaking(build): migrate to Esbuild for bundling (webdriverio#13338)
  fix(@wdio/protocols): remove return value for navigateTo (webdriverio#13335)
  fix(@wdio/runner): check if getTypes is available when filtering through browser logs
  fix(@wdio/runner): filter for severe errors
  fix(@wdio/runner): retry on Outdated Optimize Dep Vite errors (webdriverio#13330)
  feat(webdriverio): new command to set viewport (webdriverio#13258)
  chore(deps): fix pnpm-lock
  chore(deps): bump vite-plugin-top-level-await from 1.4.1 to 1.4.2 (webdriverio#13282)
  fix(dependabot): fix dependabot ignore setting
  chore(testing): update Vitest to v2
  chore(sponsoring): add Route4Me to Backers.md and Readme.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: New Feature 🚀 PRs that contain new features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant