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
0
votes
2 answers

Unknown Host in selenium HtmlUnitDriver

I am getting Unknown Host as a return of driver.getPageSource() public static void main(String[] arg) { HtmlUnitDriver driver = new…
0
votes
1 answer

How to scrape html code which is inside JavaScript in selenium with htmlunitdriver?

I wanna access input field, for entering username in selenium with headless browser And this is the code document.write(""); How to access and enter the value when the HTML code is written inside…
Akshay R
  • 1
  • 1
0
votes
1 answer

Handling Alerts in HtmlUnit

How the alerts in HtmlUnit will be handled? For Supposeenter image description here It is not required to click "OK" in htmlUnit. But in selenium, it will throw UnhandledAlertException. How it is different in HtmlUnit from Selenium.
Sumanth
  • 1
  • 1
0
votes
1 answer

SPNEGO authentication with Selenium Web Driver

I have SPNEGO authentication for my applications and am doing automated testing using selenium HtmlUnitDriver. I have tried running the browser automation code inside login context of SPNEGO authentication, but it seems like it is not working, The…
0
votes
0 answers

How to authenticate proxy using HtmlUnit driver?

I'm using Selenium in order to scrape a website, and want to send my requests through a proxy. How do I authenticate requests to the proxy server using HtmlUnit driver? I've successfully authenticated requests when using the Chrome driver, so the…
veyndan
  • 382
  • 5
  • 9
0
votes
0 answers

HtmlUnit read youtube chat

I am trying to read youtube chat messages using HtmlUnit @Test void test() throws IOException { try (final WebClient webClient = new WebClient()) { webClient.getOptions().setThrowExceptionOnScriptError(false); …
isADon
  • 3,433
  • 11
  • 35
  • 49
0
votes
0 answers

How to fix "java.lang.error" in java HtmlUnitDriver

I'm trying to log into a website with HtmlUnitDriver and I keep getting a java.lang.error. Ive added multiple jars to fix my com.gargoylesoftware.htmlunit.browserversion error which fixed that but caused another problem. import…
finesse
  • 13
  • 2
0
votes
1 answer

org.openqa.selenium.WebDriverException: com.gargoylesoftware.htmlunit.ScriptException: Exception invoking getOffsetTop with HtmlUnitDriver & Selenium

Whenever I try to set HtmlUnit enableJavaScript to true, it returns this error: org.openqa.selenium.WebDriverException: com.gargoylesoftware.htmlunit.ScriptException: Exception invoking getOffsetTop I set it to true with this: driver = new…
Jeff
  • 170
  • 2
  • 5
  • 19
0
votes
0 answers

Selenium : HtmlUnit UnexpectedTagNameException error with dropdown box

Currently, I am using HtmlUnit as my driver. With Selenium, I was attempting to write a dropbox choice selector, that can choose a state. as shown I keep on receiving this error: org.openqa.selenium.support.ui.UnexpectedTagNameException: Element…
Jeff
  • 170
  • 2
  • 5
  • 19
0
votes
1 answer

Jmeter - Selenium/Webdriver Support : HTMLUNIT driver error

java.lang.IllegalArgumentException: Browser name must be htmlunit at org.openqa.selenium.htmlunit.HtmlUnitDriver.determineBrowserVersion(HtmlUnitDriver.java:315) ~[htmlunit-driver-2.33.0.jar:?] at…
0
votes
3 answers

how to resolve htmlUnit WrapsDriver Error

I'm running test with HtmlUnit with selenium 3.13 jar, browser launches successfully, but after than it stops working with below error. > Exception in thread "main" java.lang.NoClassDefFoundError: org/openqa/selenium/WrapsDriver at…
Prasad_Joshi
  • 642
  • 3
  • 13
  • 34
0
votes
1 answer

Can't open any page with java selenium HtmlUnit (maven install)

Trying a simple code to open a web page using java HtmlUnitDriver. I don't get any compilation errors but the driver.get(url) never opens any webpage. Here is my pom.xml:
0
votes
2 answers

HtmlUnit and HTTPS pages

I'm trying to make a program that checks avaliable positions and books the first avaliable one. I started writing it and i ran into a problem pretty early. The problem is that when I try to connect with the site (which is https) the program doesn't…
user7803674
0
votes
1 answer

IllegalStateException: Unable to locate element by name for com.gargoylesoftware.htmlunit.UnexpectedPage with HtmlUnitDriver while getTitle()

Here is my basic code for launching HTMLUnit browser and getting the title. while running the code i am getting the title as null and later it is throwing the following execpetion: Jars…
0
votes
2 answers

Cannot find the WebElements with Selenium that I can see from the Chrome browser's inspect window

Edit: It works with the chrome driver but not with HtmlUnitDriver, why? I am trying to get WebElements with classname = "cat-pick_i" I can see these elements in Chrome's inspect window as seen here My code is as follows, WebDriver driver = new…
E.Bülbül
  • 39
  • 1
  • 9