How to convert commands recorded in selenium IDE to Java?

Amith picture Amith · Oct 14, 2013 · Viewed 52.7k times · Source

Is there any application or simple way to convert all the commands recorded by Selenium IDE to Java (Selenium WebDriver)? It would be a lot more easier and would save a lot of time.

Any suggestions will be appreciated. Thanks!

Answer

Pavel Janicek picture Pavel Janicek · Oct 14, 2013

In my Selenium IDE version 2.4.0 it is easy as pie:

  1. Record testcase in Selenium IDE
  2. Click File - Export Test Case As - Java / JUnit4 / WebDriver
  3. Save File as .java

And here you go! Your testcase is converted to WebDriver ;)