Spomky-Labs / pwa-bundle

PHP library for generating a full featured PWA manifest
https://pwa.spomky-labs.com
MIT License
35 stars 2 forks source link

configurable create:screenshot timeout #233

Open tacman opened 1 week ago

tacman commented 1 week ago

Description

My application loads a lot of javascript (datatables, in particular), and the screenshot shows a near empty screen because it's not finished loading.

This is what I'm trying to capture:

https://museado.org/es/pixie/pixie/meili/larco/object

bin/console pwa:create:screenshot https://museado.org/es/pixie/pixie/meili/larco/object --width="1000" --height="700" --filename="tablet/es/pixie_meili_browse-larco_object-1000x700.png

A --timeout 6000 in the CLI might work, or a timeout open in the configuration. What is the default timeout now?

Example

image

but should be

image

tacman commented 2 days ago

Any suggestions on how to solve this? Like waiting until a particular element appears?

In this case, it loads datatables and all its plugins, then loads a batch of data including photos, so the initial page load is pretty heavy. Then it works pretty quickly, but I'm not sure how to get a screenshot if the site itself takes several seconds to get to this point.