HtmlUnit Scripter: HtmlUnit equivalent for Selenium IDE

http://code.google.com/p/htmlunitscripter/

HtmlUnit Scripter is a Firefox extension that generates Java code based on items that you interact with while using the browser. The generated Java code can then be copied into a Java class that uses HtmlUnit jars (available at http://htmlunit.sourceforge.net) to interact with web pages. HtmlUnitScripter can track the actions of clicking a mouse and filling in text on a web page.

It works fairly well to record generic user interactions with web pages, except for determining the XPath for button clicks.

Advertisements
This entry was posted in Information Technology. Bookmark the permalink.

One Response to HtmlUnit Scripter: HtmlUnit equivalent for Selenium IDE

  1. Mohsen says:

    Another way is simply using Selenium IDE and record your test. After that export it to HtmlUnit by File -> Export Test Case As -> Java. After that open the file and just replace the following file:
    @Before
    public void setUp() throws Exception {
    driver = new FirefoxDriver();

    with this:
    driver = new HtmlUnitDriver();

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s