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

NoSuchElementException while using Xpath with HtmlUnitDriver

I need to run Selenium in Linux machine and using HtmlUnitDriver to achieve this. Selenium script contains most of Xpath to find the elements. While running, NoSuchElementException is getting displayed at the places where xpath is used.…
Jugi
  • 1,244
  • 3
  • 23
  • 51
0
votes
1 answer

Selenium getText() not working on htmlunitdriver

I looked around and couldn't find an specific answer that helped me figure out what's happening in my code. I'm running a selenium webdriver test using the htmlunitdriver . I'm just uploading a picture on photobucket for learning purposes. I've used…
0
votes
1 answer

Not getting the actual content while using HtmlUnit (Response is OK i.e. 200 but the data displayed on webpage is missing in downloaded content)

I am getting the proper htmlContent while using this code for other sites but one site this is not working (see below). Please advise what additional I can do? public class Test3 { public static void main(String[] args) throws…
Shashank
  • 712
  • 15
  • 33
0
votes
1 answer

HtmlUnitDriver fails to load url.

I am currently using HtmlUnitDriver 2.45 version and when I run below code snippet BrowserVersion version = BrowserVersion.CHROME; WebDriver driver = new HtmlUnitDriver(version); driver.get("http://www.google.com"); …
0
votes
0 answers

Selenium webdriver wait until not working

Hi I am trying to wait until an element is loaded in selenium. This code I have copied from the Selenium website tutorial. But there is an error in the last line. Error is "Cannot resolve method…
Geo Paul
  • 1,777
  • 6
  • 25
  • 50
0
votes
1 answer

Geb overwrite web driver

I'm running my tests using gradle which is specifying JVM properties in the following manner: -Dgeb.env=dev -Dgeb.driver=org.openqa.selenium.htmlunit.HtmlUnitDriver This sets driver and configures environment in Geb config script. I want to enable…
mordka
  • 392
  • 3
  • 11
0
votes
1 answer

Search using Selenium WebDriver works on google but Fails on yahoo

All: I am running a simple Java application with Selenium WebDriver. I was able to successfully run a search on http://www.google.com using org.openqa.selenium.htmlunit.HtmlUnitDriver I tried to run the same search term on http://www.yahoo.com as…
crazyTech
  • 1,379
  • 3
  • 32
  • 67
0
votes
1 answer

HtmlUnit getPage() throwing exception

The getPage() function of HtmlUnit is throwing javax.net.ssl.SSLException: Invalid TLS padding data and javax.net.ssl.SSLException: Received fatal alert: bad_record_mac not always but when after two three requests it starts throwing exception. The…
gursahib.singh.sahni
  • 1,559
  • 3
  • 26
  • 51
0
votes
1 answer

Cannot use HtmlUnitDriver in Geb-Spock Grails test because of dependencies problems

I'm trying to use HtmlUnitDriver in Geb-Spock functional test in Grails 2.3.7. I build project using Maven. When I run test using this driver I get: java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal I think I get this error, because I…
nuoritoveri
  • 2,494
  • 1
  • 24
  • 28
0
votes
2 answers

What is the default HtmlUnitDriver timeout for page loads?

What is the default timeout that HtmlUnitDriver uses when waiting for a page to load? Which functions in the HtmlUnitDriver API can I call to get the timeout value? HtmlUnitDriver h = new HtmlUnitDriver(); I don't see any gettimeout function in the…
David Michael Gang
  • 7,107
  • 8
  • 53
  • 98
0
votes
1 answer

How to use socks proxy in webdriver's HTMLUNIT?

the code: cap = DesiredCapabilities.HTMLUNITWITHJS driver = webdriver.Remote("http://localhost:%i/wd/hub" % HTMLUNIT_PORT, cap) tried doing this before initializing: ... cap['proxy']['proxyType'] = 'manual' cap['socksProxy'] = ip + ':' +…
Spaceman
  • 1,185
  • 4
  • 17
  • 31
0
votes
1 answer

Configuration of selenium webdriver with xorg-x11-server-Xvfb

We have developed selenium webdriver script with junit+java using eclipse on window 7. All the scripts are working as expected now we are using this script for load testing using Jmeter. However, while running script system open multiple browser…
Karim Narsindani
  • 434
  • 3
  • 14
  • 38
0
votes
1 answer

Unable to upload file using Selenium web driver

I am trying to upload file using selenium web driver by the following code: WebDriver driver = new HtmlUnitDriver(); // And now use this to visit login page driver.get(URL_UPLOADFORM); // Find the text input element…
rahulserver
  • 10,411
  • 24
  • 90
  • 164
0
votes
1 answer

Can't run Geb tests using HtmlUnitDriver under Maven

I am running the example Google spec, i.e: class GoogleHomePageSpec extends GebReportingSpec { def "first result for wikipedia search should be wikipedia"() { given: to GoogleHomePage expect: at GoogleHomePage when: …
profpfeff
  • 1
  • 5
0
votes
1 answer

Unable to download webcontent by htmlunit for a specific URL for other url's its fine

I am using the gui-less browser htmlunits to retrieve the webcontent for webpages and the code is working fine for other sites except "http://www.xyzzzzzzz.com.sg/". Can anybody explain why this is happening???? I already used HtmlUnit webdriver for…
Shashank
  • 712
  • 15
  • 33