Skip to content

Commit

Permalink
Merge pull request #487 from GoogleChromeLabs/fix/UA-string-mocking
Browse files Browse the repository at this point in the history
Fix: Add mock UA string
  • Loading branch information
mohdsayed authored Feb 9, 2024
2 parents bdfb3a1 + fe29631 commit e196b1d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/cli/src/utils/browserManagement/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ export class BrowserManagement {
throw new Error('Browser not intialized');
}
const sitePage = await this.browser.newPage();

await sitePage.setUserAgent(
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36'
);

sitePage.setViewport({
width: 1440,
height: 790,
Expand Down

0 comments on commit e196b1d

Please sign in to comment.