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
815 stars 61 forks source link

Add dedicated element pickers for "span"-tag to the DSL #47

Closed skrapeit closed 5 years ago

skrapeit commented 5 years ago

currently it is possible to to pick span-tag using

...
expect {
    element("span") {
        text() toBe "I'm the inner text"
     }
}

make it possible to have a more convenient and type safe way of picking elements.

e.g.:

...
expect {
    span {
        text() toBe "I'm the inner text"
     }
}