Skip to content

HtmlUnitDriver a page is not loading properly but other do #236

Description

@Uceef94

I'm facing a problem with HtmlUnitDriver which is that the following page (link) doesn't load properly, but other pages do.

HtmlUnitDriver driver = new HtmlUnitDriver(BrowserVersion.CHROME) 
        {
            protected WebClient modifyWebClient(WebClient client)
            {
                final DefaultCredentialsProvider credentialsProvider = new DefaultCredentialsProvider();
                credentialsProvider.addCredentials(username, password, ip, port, AuthScope.ANY_REALM);
                client.setCredentialsProvider(credentialsProvider);
                return client;
            }
            
        };

driver.setJavascriptEnabled(true);

driver.get(website.getRegisterUrl());

System.out.println(driver.getPageSource());

This is what I'm getting with "driver.getPageSource()". I had to shorten the value of src since it has 114616 characters.

        <img id="logo" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEU...AAAAAAAgPAIAAAAAAAAIjwAAAAAAAIDwCAAAAAAAAAiPAAAAAAAAwEX0PwMAIrYj8Sz00rEAAAAASUVORK5CYII="/>
      </div>
    </div>
  </body>
</html>

Any help would be greatly appreciated and thank you for your time!

No activity

Activity on this issue will appear here.

Activity

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

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