Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6582563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:17:44+00:00 2026-05-25T16:17:44+00:00

im having a problem with HtmlUnitDriver using Selenium. Im using the Selenium 2.5 version.

  • 0

im having a problem with HtmlUnitDriver using Selenium.

Im using the Selenium 2.5 version.

The test is so simply and usualy it works correctly but sometimes the driver just stop and wait endlessly for a page to load.

my code is something like this:

initialization…

private WebDriver driver;
    driver = new HtmlUnitDriver(BrowserVersion.FIREFOX_3_6);((HtmlUnitDriver) driver).setJavascriptEnabled(true);
        //driver = new FirefoxDriver();
        driver.manage().timeouts().implicitlyWait(0, TimeUnit.MILLISECONDS);
        driver.manage().timeouts().setScriptTimeout(0, TimeUnit.MILLISECONDS);

and then a lot of blocks like this one:

new Actions(driver).moveToElement(driver.findElement(By.linkText("Someting"))).perform(); 
        driver.findElement(By.linkText("something else")).click();
        driver.findElement(By.name("something")).sendKeys("8");
        driver.findElement(By.xpath("//img[@title='something']")).click();

after each clic() it loads a new page.

I usualy end the whole test correctly and i have try catched all the blocks so the web is not the problem.

The webdriver is ignoring the timeouts(i try a lot of diferent timeouts and the problem persists) and i cant stop the driver from another threads invoquing “quit()” or “close()”

I search everywhere but i cant found a solution.

¿Anyone can help me?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T16:17:45+00:00Added an answer on May 25, 2026 at 4:17 pm

    I solve it, i post my solution if anyone have the same problem.

    Im pressing esc from other thread (the main is busy waiting…)

    ((HtmlUnitDriver) test.getDriver()).getKeyboard().pressKey(Keys.ESCAPE);
    

    and then i kill the browser and restart the test

    test.getDriver().quit(); restart();//create a new test instance
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having problem in getting reference of Ajax control extender using $find() or
I'm having problem restricting a query in mdx, using except function at where clause.
I am having problem getting my tooltip to work when using the jQuery load()
I am having problem uplaoding file, here are my codes: Any help? Thanks! test.html
I am having problem with Monodevelop 2.4 on windows 7 x64. When using Control-Tab
i having problem understanding what is wrong with my inheritance. I just can not
I am having problem with DB2. I just installed the db2 as a db2admin
I am having problem while loading .properties file. The following works: private static Properties
I am having problem with my query... This one works: select name, bday, address,
I am having problem mocking an object to test a descriptor. This is the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.