{"id":24977938,"url":"https://github.com/mondata-dev/wdio-viewport-size","last_synced_at":"2025-08-12T23:09:46.034Z","repository":{"id":41691039,"uuid":"248822053","full_name":"mondata-dev/wdio-viewport-size","owner":"mondata-dev","description":"A port of setViewportSize to webdriverio 5","archived":false,"fork":false,"pushed_at":"2024-05-31T12:05:08.000Z","size":333,"stargazers_count":4,"open_issues_count":7,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-09T18:56:36.864Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mondata-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-03-20T18:09:27.000Z","updated_at":"2024-05-31T12:05:11.000Z","dependencies_parsed_at":"2024-05-31T12:30:52.148Z","dependency_job_id":"d695a710-b462-4238-aea4-ead5a0f6b734","html_url":"https://github.com/mondata-dev/wdio-viewport-size","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"6c4dfd065b45de765d7dc6d1569ebeba9c95a815"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/mondata-dev/wdio-viewport-size","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mondata-dev%2Fwdio-viewport-size","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mondata-dev%2Fwdio-viewport-size/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mondata-dev%2Fwdio-viewport-size/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mondata-dev%2Fwdio-viewport-size/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mondata-dev","download_url":"https://codeload.github.com/mondata-dev/wdio-viewport-size/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mondata-dev%2Fwdio-viewport-size/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270149345,"owners_count":24535728,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-03T23:42:19.807Z","updated_at":"2025-08-12T23:09:45.976Z","avatar_url":"https://github.com/mondata-dev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebdriverIO Viewport Size\n\nThis is a port of the old [`setViewportSize` function](https://github.com/webdriverio-boneyard/v4/blob/master/lib/commands/setViewportSize.js) of webdriverio v4 to webdriverio v5.\nIt allows setting the size of the viewport which is helpful for consistent visual regression testing.\n\n## Usage\n\n1. Install the package:\n\n```bash\nnpm install --save-dev wdio-viewport-size\n```\n\n2. Import the service and add it to your `wdio.conf.js` file:\n\n```javascript\nconst { ViewportSizeService } = require(\"wdio-viewport-size\");\n\nexports.config = {\n  // other configuration\n  services: [[ViewportSizeService]],\n};\n```\n\n3. Use available commands:\n\n```typescript\nbrowser.getViewport(): Promise\u003c{ width: number, height: number }\u003e\nbrowser.setViewport(width: number, height: number, retries = 5): Promise\u003cvoid\u003e\n```\n\n## Example\n\nThe following repo contains a boilerplate setup for e2e testing with webdriverio: https://github.com/mondata-dev/e2e.\nIt includes `wdio-viewport-size` and uses it to set the viewport size before each feature to the same value.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmondata-dev%2Fwdio-viewport-size","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmondata-dev%2Fwdio-viewport-size","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmondata-dev%2Fwdio-viewport-size/lists"}