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

Porting Selenium test from Firefox driver to HTMLUnit driver

I am trying to convert my selenium test from Firefox browser to HTMLUnit driver. But, when I try to run the HTMLUnit test , it gives me error for XPATH. The Firefox browser test runs absolutely fine. My application test suite extensively uses XPATH…
Parag Mahajan
  • 15
  • 1
  • 1
  • 4
0
votes
2 answers

Selenium HtmlUnitDriver Login to Website

I am trying to use an HtmlUnitDriver to login to marketwatch.com. I don't think the program is ever getting past the login prompt, and I did check that I have the correct email and password... Thank you so much for trying to help me! Here's my…
0
votes
0 answers

Running Selenium with Chrome driver and disable chrome browser view

I'm using the following driver : WebDriver m_driver = new ChromeDriver(); WebDriverWait waitableDriver = new WebDriverWait(m_driver , 10); The first action…
0
votes
0 answers

HtmlUnitDriver is not working

HtmlUnitDriver is not working properly. Below are the sample code. What am i doing wrong? import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import…
asu
  • 97
  • 10
0
votes
1 answer

Unable to getText of table>>TD element in HTMLUNITDRIVER

Below is my HTML structure of page. 8 Add Route Translation Force Complete…
0
votes
0 answers

HtmlUnitDriver hangs on zul page with javascript enabled?

Product have been developed in ZK framework. Performed a headless testing with HtmlUnitDriver and it got hanged in the login page. Later i found that it also hanged on getting the same zul pages as well which is available in the internet. (Ex:…
0
votes
0 answers

Javascript enabling is not working in chrome in htmlunitdriver

I am trying to get data from e-commerce sites by crawling using jsoup. Since I am getting dynamic contents i am using HtmlUnitDriver. But it is returning only empty tags as given below. I have also enabled javascript by giving the following…
Avles
  • 15
  • 2
  • 9
0
votes
0 answers

Headless browser automation - Phantomjs &HtmlUnitDriver in Selenium Webdriver jar

I'm trying to do headless browser automation. I have tried both Phantomjs and HtmlUnitDriver but I have not been successful using them. I'm in my office proxy network. I'm not sure if that's the issue. Please find my selenium code to use Phantomjs…
0
votes
1 answer

Error:org.openqa.selenium.ElementNotVisibleException: You may only interact with visible elements using htmlunitdriver?

I am getting this error: org.openqa.selenium.ElementNotVisibleException: You may only interact with visible elements when I use HtmlUnitDriver. It works for URL, after that when I start with…
ash
  • 59
  • 1
  • 6
0
votes
1 answer

Using HtmlUnit to get the access token from instagram

Since httpURLconnection didn't cut out, i switched to htmlUnit to get programatically the auth code to get the access token from instagram and then do whatever i need from there, the thing is i'm stuck trying to retrieve the authorization code from…
Progs
  • 1,059
  • 7
  • 27
  • 63
0
votes
0 answers

Unable to execute JavaScript with HtmlUnitDriver

The following code declares a HtmlUnitDriver with javascript enabled using new HtmlUnitDriver(true) and then creates a JavaScriptExecutor like below WebDriver driver = new HtmlUnitDriver(true); JavascriptExecutor js = (JavascriptExecutor)…
0
votes
4 answers

org.openqa.selenium.NoSuchElementException: Unable to locate a node using HtmlunitDriver/Phantomjs

I am using HTMLUnitDriver. It is unable to locate the xpaths and css selectors WebDriver d=new HtmlUnitDriver(); WebDriverWait wait = new WebDriverWait(d, 10); // d.manage().timeouts().implicitlyWait(20,…
0
votes
1 answer

HtmlUnitDriver browser emulate mode

I have created a simple factory method that creates a HtmlUnitDriver in a specified mode. For example public static HtmlUnitDriver createHtmlUnitDriver(String browserMode) { switch(browserMode.toLowerCase()) { case "chrome": …
PDStat
  • 5,513
  • 10
  • 51
  • 86
0
votes
0 answers

How to Timeout Page Using Websockets in HtmlUnit

Sample URL: http://www.heatpressnation.com/sublimation-printers-ink.html Websocket URL: https://us22.zopim.com When calling that page, HtmlUnit never completes because of the websocket connection to zopim.com. How can I force the page to finish…
Vaibhav
  • 2,073
  • 4
  • 23
  • 26
0
votes
1 answer

HtmlUnitDriver writes logs in my personal Log4J files

I wrote crawlers for 3 different sites and run the crawlers in 3 threads. For each crawler I use single logger. My 'log4j.properties' file looks like: log4j.rootLogger=TRACE, ZDNET, CNET,…
Yakiv Holovko
  • 421
  • 2
  • 5
  • 11