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 7616531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:54:40+00:00 2026-05-31T02:54:40+00:00

How do I tell Selenium to use HTMLUnit? I’m running selenium-server-standalone-2.0b1.jar as a Selenium

  • 0

How do I tell Selenium to use HTMLUnit?

I’m running selenium-server-standalone-2.0b1.jar as a Selenium server in the background, and the latest Python bindings installed with “pip install -U selenium”.

Everything works fine with Firefox. But I’d like to use HTMLUnit, as it is lighter weight and doesn’t need X. This is my attempt to do so:

>>> import selenium
>>> s = selenium.selenium("localhost", 4444, "*htmlunit", "http://localhost/")
>>> s.start()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.6/dist-packages/selenium/selenium/selenium.py", line 189, in start
    result = self.get_string("getNewBrowserSession", start_args)
  File "/usr/local/lib/python2.6/dist-packages/selenium/selenium/selenium.py", line 223, in get_string
    result = self.do_command(verb, args)
  File "/usr/local/lib/python2.6/dist-packages/selenium/selenium/selenium.py", line 217, in do_command
    raise Exception, data
Exception: Failed to start new browser session: Browser not supported: *htmlunit

Supported browsers include:
  *firefox
  *mock
  *firefoxproxy
  *pifirefox
  *chrome
  *iexploreproxy
  *iexplore
  *firefox3
  *safariproxy
  *googlechrome
  *konqueror
  *firefox2
  *safari
  *piiexplore
  *firefoxchrome
  *opera
  *iehta
  *custom

So the question is, what is the HTMLUnit driver called? How do I enable it?

The code for HTMLUnit seems to be in the source for Selenium 2, so I expected it to be available by default like the other browsers. I can’t find any instructions on how to enable it.

  • 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-31T02:54:41+00:00Added an answer on May 31, 2026 at 2:54 am

    using the selenium 2.20.0.jar server and matching python version, I am able to use HtmlUnitDriver by specifying the browser as *mock

    from selenium import webdriver
    from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
    
    server_url = "http://%s:%s/wd/hub" % (test_host, test_port)
    dc = DesiredCapabilities.HTMLUNIT
    wd = webdriver.Remote(server_url, dc)
    wd.get('http://www.google.com')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am running a ubuntu server with apache/php/mysql. I want to use selenium on
I am trying to apply this bug fix http://code.google.com/p/selenium/source/detail?r=11856 to the selenium-server-standalone-2.0b3.jar. Does anyone
I'm trying to tell the org.openqa.selenium.firefox.FirefoxDriver of Selenium to use an existing profile along
Tell why you think Python, Perl, Ruby, etc is easiest for plugging in modules
Please tell me what the following sentence means in ' The Zen of Python
I'm testing a richfaces application with selenium. It works fine, unless I use reRender
I use selenium, usually with firefox, to test my rails apps and it's all
I want to use Selenium2 Chrome driver with Ruby/Python, but I only found those
I am using Selenium 2 (latest release from Googlecode) and I have it firing
Tell me please, how to use getBulkUserInformationFor: method correctly? I have Could not authenticate

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.