Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert commands recorded in selenium IDE to Java?

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!

like image 575
Amith Avatar asked Oct 14 '13 10:10

Amith


People also ask

How do I export Selenium IDE to Java?

The Selenium IDE enables recorded test cases to be exported to a range of programming languages and their respective testing frameworks. To do this: Either right-click on the test name or hover the mouse near the end of the test name field until three dots appear. Click on this and select export.

Can you export from Selenium IDE?

You can export either a test or suite of tests to WebDriver code by right-clicking on a test or a suite, selecting Export , choosing your target language, and clicking Export . This will save a file containing the exported code for your target language to your browser's download directory.

Does Selenium IDE support record and play?

Selenium IDE is the ultimate tool for using Record and Playback. To install Selenium IDE, go to the Chrome web store. Download the Selenium IDE extension.

How do I export logs from Selenium IDE?

For the log file export use the name "log" (no file extension). The log file is then exported with the file name "uivision_log. txt". Another method to export the log is to use the command line switch -savelog logfilename.


1 Answers

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 ;)

like image 50
Pavel Janicek Avatar answered Oct 07 '22 08:10

Pavel Janicek