Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] add matchers that support kotlinx.html DSL #78

Open
christian-draeger opened this issue Mar 1, 2020 · 0 comments
Open

[FEATURE] add matchers that support kotlinx.html DSL #78

christian-draeger opened this issue Mar 1, 2020 · 0 comments
Assignees
Labels
feature request New feature or request
Milestone

Comments

@christian-draeger
Copy link
Collaborator

I think it would be really awesome if skrape{it} would provide matchers that are using the kotlinx.html DSL
To compare the inner html of an selected element (picked by skrapeit) with an expected markup (defined by html dsl).

Describe the solution you'd like

htmlDocument {
    div {
        withClass = "foo" 
        find First {
            // the selected html by skrapeit could be something like `<div class="bar foo" id="xx">`
            html toBe div("foo bar") { id = "xx" } 
        } 
    } 
} 

Additional context
One tricky part will be to unify the html somehow. For instance <div id="xx" class="foo bar" > has to match <div class="bar foo" id="xx">

@christian-draeger christian-draeger added the feature request New feature or request label Mar 1, 2020
@christian-draeger christian-draeger changed the title [FEATURE] [FEATURE] add matchers that support kotlinx.html DSL Mar 1, 2020
@christian-draeger christian-draeger added this to the 1.1.0 milestone Apr 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants