Skip to content

Find buttons by type may return more elements than expected #555

@jowerner

Description

@jowerner

When finding buttons by type attribute via CSS, there is a tiny discrepancy between HtmlUnit and real browsers. For example, when we search for button[type='submit'], HtmlUnit will find not only submit buttons, but also buttons without a type attribute. Maybe this is because the default value for the type attribute is submit. BTW, does not happen when searching via XPath.

Other elements / other attributes may be affected in a similar fashion, but not sure. Tested this with input elements and input[type='text'], but this works as expected.

Thanks!

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