Questions tagged [htmlunit-driver]

Selenium HtmlUnit Driver is a WebDriver implementation using HtmlUnit as browser.

Selenium HtmlUnit Driver is a WebDriver implementation which allows to control the headless browser HtmlUnit via the WebDriver API.

215 questions
3
votes
0 answers

Download file using htmlunit button onclick

I need to download a file after button click, using selenium's htmlunit in java. The issue i am having is, after simulating the button click, the downloaded content returns the entire html instead of the actual file. Below are the steps i am…
3
votes
1 answer

Polymer Webcomponent Tester (WCT) XVFB unable to connect to selenium

I am getting this error on ubuntu when we use XVFB to load WCT test. The test goes through fine the first time however, when we run the second time it fails. Looks like its missing HTMLunit Driver. I tried installing unit driver but could not fix.…
Srikanth Kondaparthy
  • 3,247
  • 3
  • 16
  • 19
3
votes
2 answers

Getting error "java.lang.NoClassDefFoundError: com/gargoylesoftware/htmlunit/html/HtmlElement"

I am using selenium webdriver for the testing I have written code: import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import…
Ashwini.J
  • 177
  • 2
  • 14
3
votes
1 answer

Not able to use htmlunitdriver in Eclipse

I'm trying to use HTMLunitdriver in eclipse. I have written WebDriver driver = new HtmlUnitDriver(); All the jar files are added in the buildpath, but I'm getting the error "HTMLunit driver cannot be resolved to a type". Can anyone provide any…
ARJUN U
  • 63
  • 1
  • 10
3
votes
2 answers

Not able to take screenShot using HtmlUnitDriver [Selenium WebDriver java]

I am wanting to take a screenshot of a page using HtmlUnitDriver I came across this Link where this guy has made a custom HTML unit driver to take the screenshot. But unfortunately, while implementing that I am getting an exception. "Exception in…
Ajay
  • 167
  • 4
  • 15
3
votes
0 answers

scroll down using htmlUnitDriver

I am working on htmlUnitDriver. I have tried so many method to scroll down the page but I didn't get any solution. Does anybody out there know how to scroll the page using HTML Unit drivers? I tried with actions and executeScript but didn't…
Kishore
  • 5,761
  • 5
  • 28
  • 53
3
votes
1 answer

HtmlUnitDriver: enable/disable Basic Authentication?

The answers to this question show how to enable Basic Auth with HtmlUnitDriver. However, how can I disable it again? Note: the accepted answer to this question is correct, however, due to a bug it does not currently work.
Christian Neverdal
  • 5,655
  • 6
  • 38
  • 93
3
votes
2 answers

Selenium WebDriver not able to find elements which are not present in the Page Source but present in HTML when seen through Developer Tools

I am using Selenium Web Driver HtmlUnitDriver for searching elements on a web page. I am able to search only those elements that are visible in the Page Source. However I can see these elements details using the Internet Explorer Developer Tools…
3
votes
2 answers

How do I handle authentication with the HtmlUnitDriver using Selenium WebDriver?

How do I handle authentication with the HtmlUnitDriver?
Jasmine.Olivra
  • 1,751
  • 9
  • 24
  • 37
2
votes
1 answer

How to fix vulnerability(CVE-2022-34169) in selenium:htmlunit-driver:3.62.0. It is coming from Xalan Java » 2.7.2 as a direct vulnerability

How to fix vulnerability(CVE-2022-34169) in selenium:htmlunit-driver:3.62.0. It is coming from Xalan Java » 2.7.2 as a direct vulnerability we are using org.seleniumhq.selenium:htmlunit-driver:3.62.0 in our karate framework. Whitesource scan is…
2
votes
1 answer

Unable to run java junit selenium code for my test case

I recorded the testcase steps using Katalon IDE and I was able to play the recording successfully using private browser session. I now wish to play the testcase in Linux using headless browser. Hence, I exported my testcase as Java Junit code as…
Ashar
  • 2,942
  • 10
  • 58
  • 122
2
votes
1 answer

Unable to run the script through htmlunit driver in selenium

I'm trying to run the htmlunit driver but It's failed to execute the script Code: public class Testworking { public static void main(String args[])throws Exception { WebDriver driver=new HtmlUnitDriver(); …
ArrchanaMohan
  • 2,314
  • 4
  • 36
  • 84
2
votes
1 answer

HtmlUnitDriver does not load javascript when navigating a page from an url

Here is my problem, I'm trying to load my website page for testing it but when i look at the html I get from the HtmlUnitDriver, elements displayed with javascript are not present. I am using selenium-java 3.141.59 and htmlunit-driver 2.33.3 Here is…
2
votes
1 answer

org.openqa.selenium.WebDriverException: Browser failed to start, test in fluentlium

I want to run simple example in fluentlium but I get an exception in driver My code: Config.java public class Config extends ConfigurationDefaults { @Override public String getWebDriver() { System.setProperty("webdriver.chrome.driver",…
Hana
  • 23
  • 3
2
votes
1 answer

Maven picking up dependency of new version

I have a Pom where I have included a dependency for selenium HTML Unit driver. It has a dependency with HtmlUnit v2.18. But While viewing the dependency tree, I was able to see that its picking up another version which I didn't specify, causing…
vsriram92
  • 593
  • 1
  • 4
  • 15
1
2
3
14 15