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

Unable to run Selenium HtmlUnitDriver test (java.net.SocketException)

Im in the process of learning how to use Selenium to automate we browsers and working my way through an online course. Im currently having some problems trying to run a headless browser test using the HtmlUnitDriver I have a simple test that should…
bobe_b
  • 187
  • 1
  • 2
  • 21
1
vote
1 answer

Limitation of HTMLUnit driver for headless testing

Can I perform following functions using HTML Unit Driver headless browser automation? Is it possible to take snapshot? Can click any hyperlink ? Possible to handle pop-ups? Please help I am planning to do automation using HTMLUnit driver
1
vote
0 answers

HtmlUnitDriver does not identified google sign in email textfied

Hi I had automated an login via Google functionality , it is working fine in Google Chrome but same code does not work when I had to run it to headless mode. org.openqa.selenium.NoSuchElementException: Unable to locate element with ID:…
Cod
  • 179
  • 1
  • 12
1
vote
2 answers

Java - Get error when trying to login to a website with selenium webdriver (htmlunit)

I tried the below code with actual credentials for Indeed.com, and I get an error: Exception in thread "main" org.openqa.selenium.NoSuchElementException: Unable to locate a node using //*[@id="signin_email"] I get a similar error when I use By.id…
Padoga
  • 495
  • 3
  • 18
1
vote
0 answers

Not able to run test on HTMLUNIT DRIVER

I am writing automation scripts in selenium webdriver and want to test it on headless browser. When I tried HTMLUNITDRIVER, the test doesn't even start. I couldn't find out the step where script was not working. The same script runs successfully on…
1
vote
1 answer

htmlunit-driver 2.26 has duplicate pom

I am reffering to following pom entry for dependencies of htmlunit-driver. org.seleniumhq.selenium htmlunit-driver 2.27 But while packaging it…
Amit
  • 182
  • 3
  • 3
  • 12
1
vote
1 answer

Selenium Htmlunitdriver not working although FirefoxDriver works

Why does this code yield "Failure" with HtmlUnitDriver but "Success" with FirefoxDriver? It is trying to capture text that loads several seconds after the rest of the page. I need "Success" with HtmlUnitDriver. // WebDriver driver = new…
1
vote
1 answer

htmlunit-driver - how to simulate drag-and-drop?

Is there a way to simulate a drag-and-drop with htmlunit-driver? When using Actions it throws an UnsupportedException Inside the class HtmlUnitMouse: @Override public void mouseMove(Coordinates where, long xOffset, long yOffset) { throw new…
stefaan dutry
  • 1,096
  • 1
  • 10
  • 21
1
vote
0 answers

Selenium HtmlUnitDriver gives "geb.navigator.EmptyNavigator' is not present" error although Firefoxdriver works fine

I am performing a simple GUI test using Geb/Spock and Selenium. My Spec : class MySpecSpec extends LoggedInSpec { def "My criteria here"() { given: "Starting at the unit search entry page" to MyHomePage when: def result =…
1
vote
1 answer

selenium webdriver take too much time in .get() method and then unconditionally stop my whole java process.(It is only for one specific URL only)

friends i am using selenium webdriver to fetch pagesource in my java desktop application. I am getting problem with only one URL which is "http://www.greenbergdental.com/offices/university" every time I try to get this my current java thread was…
1
vote
1 answer

Difficult to run the script in selenium webdriver which contains HtmlUnitDriver

I am unable to run the basic selenium script which contains the HtmlUnitDriver. If I try to run the code I get the following error. Code: public class SampleUnitDriver { public static void main(String[] args) throws Exception { …
sandeep kumar
  • 195
  • 1
  • 4
  • 20
1
vote
0 answers

Click the button with the HtmlUnit - Java

I am unable to click a button to HtmlUnit , already tried by the name and ID , it does not have a Value, already I put waiting and still nothing . HtmlButton button = (HtmlButton) page2.getElementById("imbInserir"); try { button.click(); …
Paulo Roberto
  • 1,498
  • 5
  • 19
  • 42
1
vote
1 answer

HtmlUnit + Webclient.getPage throws

I am trying to access a URL (admin.do) directly after logging into the application and the URL is a restricted page. However, when I run the scenario on browser, I am able to see the page getting redirected to access denied page. However, when I run…
divinedragon
  • 5,105
  • 13
  • 50
  • 97
1
vote
2 answers

How to specify which browser to simulate when using Selenium lib in Java?

My web page only works in IE as it uses ActiveXObject in javascript. When coding a inhouse tool to test this web page, how do I specify browser type and version? The Java codes are: package main; import java.util.concurrent.TimeUnit; import…
BayOtter
  • 209
  • 2
  • 9
1
vote
1 answer

Script not working in HtmlUnitDriver

My purpose to execute headless browsing for test-automation. I am using selenium webdriver with Java. Now, issue is script is working fine in Firefox browser,but not in HtmlUnitDriver. Please guide me where I did mistake. public class Headless { …
TodayILearned
  • 1,440
  • 4
  • 20
  • 28