joelgriffith / navalia

A bullet-proof, fast, and reliable headless browser API
https://joelgriffith.github.io/navalia/
GNU General Public License v3.0
957 stars 33 forks source link

Cannot take screenshot after resizing browser #64

Closed shawnxusy closed 6 years ago

shawnxusy commented 6 years ago

Love this repo and switching all our E2E tests to using Navalia!

Bumped into this issue with screenshot, my situation is the same as this closed issue: https://github.com/joelgriffith/navalia/issues/63

However no matter how large I resize the browser to (I tried chrome.size(1600,900), chrome.size(800,800), chrome.size(2500, 1200), etc), once chrome.size is called, the screenshot taken is blank.

Also, it's interesting that the png generated is four times as large as the dimension given. For example, if I call chrome.size(1600, 900), the generated blank png is of dimension (3200, 1800).

shawnxusy commented 6 years ago

By the way I was able to get to the screen size desired through Chrome flags (windowSize: '1440x800'). Since I don't need to adjust size during the testing, gonna close this one.