Skip to content

yesod-test extraction of attributes? #1406

@mwotton

Description

@mwotton

Just trying to confirm my understanding - there doesn't seem to be a way of extracting an attribute using htmlQuery?

            matches <- htmlQuery "a#annotation"

gives me

["<a href=\"/doc/91/annotations\" id=\"annotation\">Annotations</a>"]

where what i really want is to follow the href. If I haven't missed something, perhaps this would be a good addition - something like "clickOn :: Query -> YesodExample site ()", relying on an extra (as yet undesigned) primitive that can access attributes. (There doesn't seem to be anything in CSS syntax proper for extracting attributes, like XPath has - open to suggestions here.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions