Menu

#1685 Element lookup by CSS class name does not always work

2.16
closed
RBRi
None
1
2015-05-22
2015-05-20
No

HtmlUnit supports finding elements via CSS selectors, for instance, class name selectors. However, there is a special case where the lookup fails currently. See the following example:

<div class="foo bar baz">

Querying with the CSS selector ".bar" is supposed to return the div element.

This works only if the "bar" class name in the HTML example above is enclosed by regular spaces, but won't work if other whitespace characters, such as tabs or newlines, are used to separate the class names from each other.

Please see the test case which also demonstrates the behavior of Firefox and Chrome in this case.

1 Attachments

Discussion

  • RBRi

    RBRi - 2015-05-21
    • status: open --> accepted
    • assigned_to: RBRi
     
  • RBRi

    RBRi - 2015-05-22

    Fixed in SVN. Thanks for reporting.

     
  • RBRi

    RBRi - 2015-05-22
    • status: accepted --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB