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

HtmlUnitDriver does not evaluate CSS3 pseudo class :target correctly #46

lklonowski opened this Issue Mar 17, 2017 · 1 comment


2 participants

lklonowski commented Mar 17, 2017

When accessing a website with an anchor, CSS styles for a matching :target do not apply as expected.

Minimal test site:

<!DOCTYPE html>
.tab div {
    display: none;

.tab div:target {
    display: block;
<div class="tab">
<a id="link" href="#anchor">Link</a>   
<div id="anchor">

Minimal Java test code:

getWebDriver().get(TEST_URL + "#anchor");

Both times 'false' ist printed.

@asashour asashour self-assigned this Mar 17, 2017

@asashour asashour added the bug label Mar 17, 2017

@asashour asashour added this to In Progress in HtmlUnit Mar 17, 2017

@asashour asashour added this to the 2.26 milestone Mar 17, 2017


This comment has been minimized.

Show comment
Hide comment

asashour Mar 17, 2017


Thanks for reporting, fixed in HtmlUnit.


asashour commented Mar 17, 2017

Thanks for reporting, fixed in HtmlUnit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment