===
navigate to test page
%require
===
plwr -S plwr-test open "http://localhost:8599/index.html"
---

===
take full page screenshot
===
plwr -S plwr-test screenshot --path /tmp/plwr-test-full.png
---
Saved {{ bytes:number }} bytes to /tmp/plwr-test-full.png
---
where
* bytes > 1000

===
screenshot file exists
===
test -f /tmp/plwr-test-full.png
---

===
take element screenshot
===
plwr -S plwr-test screenshot --selector h1 --path /tmp/plwr-test-h1.png
---
Saved {{ bytes:number }} bytes to /tmp/plwr-test-h1.png
---
where
* bytes > 100

===
element screenshot is smaller than full page
===
full=$(wc -c < /tmp/plwr-test-full.png | tr -d " ")
elem=$(wc -c < /tmp/plwr-test-h1.png | tr -d " ")
echo "$elem $full"
---
{{ elem_size:number }} {{ full_size:number }}
---
where
* elem_size < full_size
