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
1
vote
1 answer

Bad input type: "email", creating a text input error when use HtmlUnitDriver

I am login into google plus using selenium htmlunit driver. below code is working fine with fireFox driver. When I use HtmlUnitDriver, it gives some error like "Bad input type:" HtmlUnitDriver driver = new…
Kishore
  • 5,761
  • 5
  • 28
  • 53
1
vote
1 answer

How to enable javascript in HtmlUnit

This is my coding for HtmlUnit final WebClient webClient = new…
Suresh S
  • 81
  • 2
  • 9
1
vote
0 answers

Selenium HtmlUnit issue

It does not click element in HtmlUnit but works fine on Firefox. for the link Link and the element //*[@align="right"]/a. The htnmlunit finds the element anchor tag but the tag does not contain href. It clicks the element but does not visit next…
Afroz Shaikh
  • 362
  • 4
  • 18
1
vote
0 answers

How to sendtext in ckeditor through htmlunitdriver in webdriver

How to send text in ckeditor through htmlunitdriver in web driver? Below code is working for firefoxdriver but not for htmlunitdriver . driver.switchTo().frame(driver.findElement(By.xpath("//iframe[@id='scayt_0']"))); WebElement elem =…
1
vote
2 answers

Dependency problems with Web Drivers - cannot inherit from final class

I was trying to run various web drivers (ChromeDriver and HtmlUnitDriver) in my maven Java project, but I encountered errors which I suspect to be maven dependency issues. I am seeing if anybody could help me spot the source of the error? Below are…
1
vote
1 answer

Selenium with HTMLUnitDriver ScriptException (tmp-file not found) on second .get(url)

I run selenium tests with testng and htmlUnitDriver. I use one webDriver-instance for all tests. I just logout and clear cookies driver.manage().deleteAllCookies() after every test class (the delete-cookies itself is not responsible I tested for…
cproinger
  • 2,258
  • 1
  • 17
  • 33
1
vote
0 answers

Not able to submit a form using Selenium

Hi I'm currently trying to get a script that will fill in login details on a site and the submit the form and allow me to gather information from the next page. So far I've managed to fill in the form but I can't get it to submit. I've tried the…
user1261404
  • 305
  • 2
  • 3
  • 10
1
vote
1 answer

What is the use of providing browser version in HtmlUnitDriver

I am trying to run selenium webdriver in Linux machine. So i tried to use HtmlUnitDriver to achieve this. I am getting the following error while executing the jquery. TypeError: Cannot find function addEventListener in object [object HTMLDocument].…
Jugi
  • 1,244
  • 3
  • 23
  • 51
1
vote
1 answer

Download web page content using Selenium Webdriver and HtmlUnit

For the following versions (JDK:8,JRE:8,HtmlUnit:2.17 and Selenium Webdriver:2.46), my this code works perfectly fine. When I say fine it means I am able to download the full web content (each and every line). package mypackage; import…
Shashank
  • 712
  • 15
  • 33
1
vote
0 answers

Selenium Webdriver HtmlUnitDriver: UnreachableBrowserException

I am randomly getting an org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser. It may have died. error, i.e., it doesn't always happen with the same input in the same code. The code: public class…
1
vote
1 answer

Blacklist and whitelist URLs in HtmlUnitDriver

Blacklisting URLs in PhantomJS and GhostDriver is pretty straightforward. First initialize the driver with a handler: PhantomJSDriver driver = new PhantomJSDriver(); driver.executePhantomJS(loadFile("/phantomjs/handlers.js")) And configure the…
neu242
  • 15,796
  • 20
  • 79
  • 114
1
vote
1 answer

Swiching window in HtmlUnit

When I am using selenium on FirefoxDriver I am switching windows using the following code final Set allwindowID = driver.getWindowHandles(); final Iterator itr = allwindowID.iterator(); while (itr.hasNext()) { …
1
vote
1 answer

Running HtmlUnit in C#?

I'm trying to run HtmlUnit using Selenium WebDriver in C#. When I run the following code (which as I understand it should start the HtmlUnit webdriver): var caps = DesiredCapabilities.HtmlUnit(); IWebDriver driver = new RemoteWebDriver(caps); I get…
Rune
  • 303
  • 1
  • 3
  • 13
1
vote
2 answers

Can I disable HtmlUnitWebDriver to print errors in the console?

I am getting tons of messages like: 2015-02-13 10:24:13,487 ERROR [JS executor for com.gargoylesoftware.htmlunit.WebClient@1ca81e44] [] [@@@] [] StrictErrorReporter.runtimeError(80) | runtimeError: message=[An invalid or illegal selector was…
Koray Tugay
  • 22,894
  • 45
  • 188
  • 319
1
vote
2 answers

Capture screenshot using htmlunitdriver?

How can I capture a screenshot using HtmlUnitDriver? I found that i can capture when I use FirefoxDriver but I don't want to use Firefox. So, please let me know how to capture images using HtmlUnitDriver. I googled but none of the solutions I found…
Robot
  • 101
  • 4
  • 11