Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
arifm
Active particpant
Active particpant
Posts : 12
Join date : 2012-08-08

Selenium RC Empty Selenium RC

Thu Aug 09, 2012 7:54 pm
will u send me a format of java code shown in eclipse. i am getting message 'selenese Test case' depreciated
sanjeetravi
sanjeetravi
Regular Participant
Regular Participant
Posts : 27
Join date : 2012-07-10
Age : 33
Location : Delhi

Selenium RC Empty Re: Selenium RC

Sat Aug 11, 2012 2:36 am
HEY ARIFM PLEASE REPLY UNDER THE SAME POST FOR YOUR QUESTION....THIS WAS THE RESN FOR MY LATE REPLY ...I AM PASTING A JAVA CODE HERE GO THROUGH IT....

import com.thoughtworks.selenium.*;

import org.testng.annotations.*;

import static org.testng.Assert.*;

import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.regex.Pattern;

public class Reserve_Type_Add extends SeleneseTestNgHelper {

@BeforeClass
public void setUp() throws Exception {
selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://localhost:7001/");
selenium.start();
}
@Test public void testAbc() throws Exception {


try {

FileInputStream fstream = new FileInputStream(
"C:\\Documents and Settings\\mann\\Desktop\\Add_New_Reserve_Type.txt");
// Get the object of DataInputStream
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String strLine;
// Read File Line By Line
while ((strLine = br.readLine()) != null)
{
String strline1[] = strLine.split(",");



selenium.open("/SimonWeb/login.html");
selenium.click("id=submit");
selenium.waitForPageToLoad("50000");
selenium.open("/SimonWeb/home.jsf");
selenium.click("//div[@id='dynamicMenuform:Reserve_Type']/span[2]");
selenium.waitForPageToLoad("50000");
selenium.click("id=searchForm:j_idt71");

for (int second = 0;; second++) {
if (second >= 60) fail("timeout");
try { if (selenium.isTextPresent("Code")) break; } catch (Exception e) {}
Thread.sleep(1000);
}

for (int second = 0;; second++) {
if (second >= 60) fail("timeout");
try { if (selenium.isTextPresent("Formula Description")) break; } catch (Exception e) {}
Thread.sleep(1000);
}


selenium.type("id=addEditForm:reserveCode", strline1[0]);
selenium.select("id=addEditForm:reserveType", "label=Computation Logic");
selenium.type("id=addEditForm:reserveTypeDesc", strline1[1]);
selenium.type("id=addEditForm:reserveValue1", strline1[2]);
selenium.type("id=addEditForm:reserveValue2", strline1[3]);
selenium.type("id=addEditForm:reserveValue3", strline1[4]);
selenium.type("id=addEditForm:reserveValue4", strline1[5]);
selenium.click("id=addEditForm:j_idt336");
selenium.click("id=addEditForm:popUpButton");
System.out.println(strline1[0]);
System.out.println(strline1[1]);
for (int second = 0;; second++) {
if (second >= 60) fail("timeout");
try { if (selenium.isTextPresent("You have successfully Added the Reserve Type.")) break; } catch (Exception e) {}
Thread.sleep(1000);
}}
}

catch (Exception e) {
e.printStackTrace();
}

}
@AfterClass
public void tearDown() throws Exception {
selenium.stop();
}
sanjeetravi
sanjeetravi
Regular Participant
Regular Participant
Posts : 27
Join date : 2012-07-10
Age : 33
Location : Delhi

Selenium RC Empty Re: Selenium RC

Sat Aug 11, 2012 2:38 am
YOU NEED TO CONFIGURE TWO JARS IN YOUR PROJECT BUILD PATH

1.SELENIUM JAVA CLIENT DRIVER

2.SELENIUM TESTNG HELPER
THE DEATILS OF THES TWO WERE POSTED IN PREVIOUS POST
Sponsored content

Selenium RC Empty Re: Selenium RC

Back to top
Permissions in this forum:
You cannot reply to topics in this forum