Skip to content

Commit

Permalink
add viewport
Browse files Browse the repository at this point in the history
  • Loading branch information
Yanni8 committed Jan 6, 2024
1 parent 9204951 commit 90412d1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions puppeteer/test.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,10 @@ async function run() {
console.log(`Running test on ${cap.os} ${cap.os_version} ${cap.browser} ${cap.browser_version}`);

const browser = await puppeteer.connect({
browserWSEndpoint: `wss://cdp.browserstack.com/puppeteer?caps=${encodeURIComponent(JSON.stringify(cap))}`, // The BrowserStack CDP endpoint gives you a `browser` instance based on the `caps` that you specified
});
browserWSEndpoint: `wss://cdp.browserstack.com/puppeteer?caps=${encodeURIComponent(JSON.stringify(cap))}`,

defaultViewport: { width: 1100, height: 768}
},);

await main(browser);

Expand Down

0 comments on commit 90412d1

Please sign in to comment.