3

I'm using Selenium IDE 1.0.10 for Firefox on Mac 10.6.6. Our QA department has created some HTML tests for Selenium that I need to convert to Junit. In the IDE, I can do that by going to the File menu and choosing export. What is an automated/scriptable way to do this same task?

Thanks, - Dave

1

4 Answers 4

1

Try this add in. I have not used it, but it is described just as you need it. Addin

Sign up to request clarification or add additional context in comments.

Comments

1

Try this addon which converts Selenium HTML scripts to Java .

Selenium4J

Comments

1

Look at the selenese4J-maven-plugin. Similar to selenium4j (https://github.com/RaphC/selenese4j-maven-plugin).

Provides many features : Selenium 1/2 (WebDriver) conversion Test Suite generation Internationalisation of your html file Possibility to use snippet into your html file for specific test (e.g : computing working day, write custom generation of values, handle dynamic values ...) Use of tokenized properties

Comments

0

I took the selenium4j project and turned it into a maven plugin for those who want to take the html test cases and automatically have them run with your maven test phase. You can also separate the tests out using a profile override with surefire.

Readme is here: https://github.com/willwarren/selenium-maven-plugin

The short version of the readme:

Converts this folder structure:

./src/test/selenium
    |-signin
        |-TestLoginGoodPasswordSmoke.html
        |-TestLoginBadPasswordSmoke.html
        |-selenium4j.properties

Into

./src/test/java
    |-signin
        |-firefox
            |-TestLoginGoodPasswordSmoke.java
            |-TestLoginBadPasswordSmoke.java

This is only tested on windows with Firefox and Chrome.
I couldn't get the IE version to pass a test, but I'm new to selenium so hopefully, if you're a selenium guru, you can get past this.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.