Selenium RC Programmes
Quality,  Selenium,  Selenium RC,  Selenium RC programmes

Selenium RC Programmes

There are some Selenium RC Programmes given here:

Ques: Write a program to Login into Facebook?

Program:

Package SeleniumRC;

Import com.thoughtworks.selenium.default selenium;

Public class facebook_login {

Public static void main (string [] args) {

// to do auto-generated method stub

Default Selenium  Selenium = new Default Selenium (“local host”, 4444, “*firefox”,” https://www.facebook.com/”);

Selenium.start ();     //Launch browser

Selenium.open (“https://www.facebook.com/”);  //enter and open the given url

Selenium.window maximize();   //it will maximize the window screen to the full width.

Selenium.type (“email”, example@email.com);   //enter the given credential in Email field.

Selenium.type (“pass”, example);   //enter the given credential in Password field.

Selenium.click(“u_0_2”);   //this command is for the click on the Log In Button.

}

}

 

Ques: Write a program to Login into Gmail.com by valid credentials?

Program:

Package SeleniumRC;

Import com.thoughtworks.selenium.default selenium;

Public class gmail_login {

Public static void main (string [] args) {

// to do auto-generated method stub

Default Selenium  Selenium = new Default Selenium (“local host”, 4444, “*firefox”,” https://gmail.com”);

Selenium.start ();     //Launch browser

Selenium.open (“https:// https://gmail.com”);  //enter and open the given url

Selenium.window maximize();   //it will maximize the window screen to the full width.

Selenium.type (“identifierId”, example@gmail.com);   //enter the given credential in Email field.

Selenium.click (“identifierNext”);   //click on the Next button

Thread.sleep (2000);   //2secs

Selenium.type (“password”, example);   //enter the given credential in Password field.

Selenium.click(“passwordNext”);   //this command is for the click on the Log In Button.

}

}

 

Ques: Write a program to Login into Yahoo mail?

Program:

Package SeleniumRC;

Import com.thoughtworks.selenium.default selenium;

Public class yahoo_login {

Default Selenium  Selenium = new Default Selenium (“local host”, 4444, “*firefox”,” https://www.yahoo.com/”);

Public void Open_url(){

Selenium.start ();     //Launch browser

Selenium.open (“https://www.yahoo.com/”);  //enter and open the given url

Selenium.window maximize();   //it will maximize the window screen to the full width.

}

Public void Login() {

Selenium.click (“uh-signin”);  // click on Sign In button

Selenium.type (“login-username”, example@yahoo.com);   //enter the given credential in Email field.

Selenium.click (“login-signin”);   // click on Next button

Thread.sleep (2000)   //2secs wait

Selenium.type (“login-passwd”, example);   //enter the given credential in Password field.

Selenium.click(“login-signin”);   //this command is for the click on the Sign In Button.

}

Public static void main (string [] args) {

// to do auto-generated method stub

yahoo_login m=new yahoo_login();

m.Open_url();

m.Login();

}

Useful Links:

Please click here to read Selenium RC Specification

Please click here to read Steps for creating a project in Eclipse

Please click here to read Selenium Configuration with Java

Please click here to read Selenium Components

Please click here to read Selenium IDE

Please click here to read Advantages and limitations of Selenium IDE

4 Comments

  • nike react

    I must express my affection for your kind-heartedness for men and women who really need help on this important content. Your personal dedication to passing the message all over came to be surprisingly informative and has enabled those just like me to achieve their pursuits. Your amazing invaluable tutorial signifies a great deal to me and even more to my office colleagues. Thanks a ton; from each one of us.

  • frolep rotrem

    Nice post. I learn something more challenging on different blogs everyday. It will always be stimulating to read content from other writers and practice a little something from their store. I’d prefer to use some with the content on my blog whether you don’t mind. Natually I’ll give you a link on your web blog. Thanks for sharing.

Leave a Reply

Your email address will not be published. Required fields are marked *