skrapeit / skrape.it

A Kotlin-based testing/scraping/parsing library providing the ability to analyze and extract data from HTML (server & client-side rendered). It places particular emphasis on ease of use and a high level of readability by providing an intuitive DSL. It aims to be a testing lib, but can also be used to scrape websites in a convenient fashion.
https://docs.skrape.it
MIT License
790 stars 57 forks source link

Pass relaxed property to children, siblings, allElements and parents of an element #227

Closed danisty closed 8 months ago

danisty commented 1 year ago

Fixes https://github.com/skrapeit/skrape.it/issues/223

christian-draeger commented 1 year ago

Would you be open to add some tests that on the one hand make sure it is working as expect and on the other hand show case the expected behavior?

danisty commented 1 year ago

I'm unsure if that's a correct format for a test, I'd appreciate any correction. I've ran the tests locally and, with the changes made in this pr, they all pass.

About the changes, as of right now, if you get the children of an element the relaxed property will be false for all children, even if the Document is relaxed. With the changes, the relaxed property is passed down to the children of the element.

This also applies for siblings, allElements and parents.