octaltree / playwright-rust

Playwright port to Rust
316 stars 36 forks source link

Write file on element screenshot #34

Closed West14 closed 2 years ago

West14 commented 2 years ago

This PR implements functionality, which gives an ability to screenshot a specific element. Actually, the logic was copied from the page implementation. Also, i have no idea how to deal with may_save function. so I've made it pub(crate) to use in another module.

octaltree commented 2 years ago

Thanks, I think I returned bytes and the file was not saved as intended. But I didn't return bytes either, so I may have missed something.