0

In Selenium IDE:

I have created one Test Suite : TS1.html and There are two test cases in it:
Test1.html and
Test2.html

So What are the steps to execute this TS1.html test suite in Selenium RC (Eclipse)

Ripon Al Wasim
  • 36,924
  • 42
  • 155
  • 176
Prashant Vadher
  • 1,057
  • 11
  • 9
  • Do you want to run .html format OR, do you want to convert it to another supported language? e.g. If you convert/export to Java/JUnit4/Remote control it will be save as .java extension – Ripon Al Wasim May 28 '15 at 08:11

3 Answers3

2
  1. In Selenium IDE click Options -> Options..
  2. Here check the "Enable experimental features"
  3. Click OK
  4. Options -> Format -> JUnit 4 (Remote Control)
  5. Click OK
  6. Copy Paste the output to Eclipse

Should do the magic :)

Ripon Al Wasim
  • 36,924
  • 42
  • 155
  • 176
Pavel Janicek
  • 14,128
  • 14
  • 53
  • 77
1

For executing the .html file using Selenium server without converting to any other language (such as Java, C#, Ruby, Python, Perl, PHP etc.):

  1. Open a terminal/command line
  2. Go to the location where selenium-server.jar is located
  3. Execute the following command:

java -jar selenium-server.jar -port 4546 -htmlSuite *firefox "http://www.google.com" "C:\SeleniumTest\TS1.html" "C:\result.html"

Tests will be executed in Firefox and Test Result will be generated as result.html in C drive.

Ripon Al Wasim
  • 36,924
  • 42
  • 155
  • 176
0

As Pavel said you first go to the Options in Selenium IDE and convert the recorded code into the JUnit 4 model. Then copy and paste the code into the Eclipse IDE.

sample JUnit class with two testcase:

public class JUnitSample{

    @BeforeClass
    public static void setup(){
        1)start the server
        2)Launch the browser
    }
    @Test
    public void testTestcaseName01(){
        paste your first test case 
    }
    @Test
    public void testTestcaseName02(){
        paste your second test case 
    }
    @AfterClass
    public static void setup(){
        1)close the browser.
        2)Stop the server..
    }
}

One more thing the code which was converted by IDE is not sufficient to run from the Eclipse IDE. So, you have to modify the code to run from eclipse.

Ripon Al Wasim
  • 36,924
  • 42
  • 155
  • 176
Manigandan
  • 5,004
  • 1
  • 28
  • 47