Can I change the viewport size same to window inner size with Puppeteer helper?
See original GitHub issueDetails
- CodeceptJS version:1.3.3
- NodeJS Version:10.8.0
- Operating System: Macos
- Protractor || WebDriverIO || Nightmare version (if related): Puppeteer 1.8.0
- Configuration file:
helpers: {
Puppeteer: {
url: cf.testDomain,
show: true,
restart: false,
keepCookies: true,
windowSize: '1920x1080',
chrome: {
defaultViewport: {
width: 1920,
height: 1080
},
handleSIGINT: false,
},
},
}
In the codecept.conf.js
file, I set windowSize
and defaultViewport
with the same value, but when I run test test suite:
- The viewport size of chrome is still 800x600.
- The window inner size of the webpage is 1920x1080. This is not convenient to debug by viewport.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:6
Top Results From Across the Web
Can I change the viewport size same to window inner ... - GitHub
In the codecept.conf.js file, I set windowSize and defaultViewport with the same value, but when I run test test suite: ... The window...
Read more >How to set max viewport in Puppeteer? - Stack Overflow
launch() to change the window size to your desired width and height . Then you can call the Chrome Devtools Protocol method Emulation....
Read more >Page.setViewport() method - Puppeteer
page.setViewport will resize the page. A lot of websites don't expect phones to change size, so you should set the viewport before navigating...
Read more >Change desktop screen resolution for Puppeteer tests
Learn how to change the desktop screen resolution for your Puppeteer tests across browser/OS combinations on ... This would not change the size...
Read more >Puppeteer documentation - DevDocs
Puppeteer 7.1.0 API documentation with instant search, offline support, keyboard shortcuts, mobile version, and more.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This works fine for me.
Any solution to this? I tried updating the codecept.conf.js file, but it did not help.