How can I run a test created with Selenium IDE under Selenium RC

10 views
Skip to first unread message

Augusto Gonzalez

unread,
Sep 13, 2006, 2:14:46 PM9/13/06
to selenium-users...@googlegroups.com
Hi, I'm a new user of Selenium products, I'm trying to learn how to use these programs.

I've created a test using Selenium Ide to test a web application. So, now I want to know how can I do to run this test using Selenium RC because I will need to run this test using a set of different data.

If somebody have a test to use like an example I will appreciate.

Thank you
Augusto

Ian

unread,
Sep 14, 2006, 1:59:57 AM9/14/06
to selenium-users...@googlegroups.com
The easiest way I know (assume that you are using Java to run your tests, but the IDE handles other languages) is to change the format of the tests you have created in the IDE into the "Java-RC" format. Use the Options->Format menu item to change the format.

Once you've changed the format, you need to embed it into your test launching program. Until I get it to work successfully, I'll let somebody else tell you this!

motrocco

unread,
Sep 19, 2006, 1:09:21 PM9/19/06
to selenium-users...@googlegroups.com
there are differences between both? Sorry I'm really new at this. Could you give some examples? Have a few IDE tests recorded and wondering how hard it will be to make load test from them.

Mot.

Ian

unread,
Sep 19, 2006, 7:10:49 PM9/19/06
to selenium-users...@googlegroups.com
From my experience, the steps are as follows:
1. Load up your HTML test in the IDE.
2. Click on the "Source" Tab - which should display the raw HTML.
3. Choose the "Options->Format->Java - Selenium RC" menu option.
Magic - Java code you can paste straight into a JUnit test. You may need to fix up a few things, but the compiler will pick those things up for you.

Doneel Edelson

unread,
Sep 20, 2006, 8:53:39 AM9/20/06
to selenium-users...@googlegroups.com
Here is a sample

package com.company.whatever;

import junit.framework.TestCase;

import com.thoughtworks.selenium.DefaultSelenium;
import com.thoughtworks.selenium.Selenium;

public class MyTest extends TestCase {
private Selenium selenium;

public void setUp() {
selenium = new DefaultSelenium("localhost",
4444, "*iexplore", "http://localhost:8080/CompanyProject");
selenium.start();
}

public void testStuff() {


selenium.open("http://localhost:8080/CompanyProject/?");
selenium.click("link=Maintain Stuff");
selenium.waitForPageToLoad("30000");
selenium.click("//span [@onclick='CCUtility.crtCtrla(this, \"stuff=Select=000000026\", null, null);']");
selenium.waitForPageToLoad("30000");

selenium.select("addDescription","label=Policy Id");
selenium.type("addValue","3543547");
selenium.select("addTypeCode","label=String");
selenium.click("//div [@id='btnAddParameter']");
selenium.waitForPageToLoad("30000");

}
public void tearDown() {
selenium.stop();
}
}

Reply all
Reply to author
Forward
0 new messages