2Providing wait for the tool is known as synchronization. It is to maintain in synch between application &tool

2It is two types

1)page load

2)page refresh

1) Page load:-If the application is taking time to load the page then use the command

2The advantages of the above command are, it doesn’t wait up to the given time .whenever the page load is completed,it contains the execution. the given time is the maximum time to wait.

2) Page refresh:-

2if the application is taking time to refresh the page then use the below command Thread.sleep(5000);  //5secs

2It is a standard wait. It is simply waiting up to the given time.

2Whenever we use thread. Sleep add throws. The exception to method &main method became it’s a java command. some of the java commands will throw exception to handle it use throws exception.

2Write a program to register into by using methods?

Interested in mastering Selenium Training? Enroll now for FREE demo on Selenium Training Courses.

Note:-when ever the application is taking time either for page load or page refresh use selenium. Wait for page load command, if it is throwing exception like timeout then change the wait for page load command to thread.sleep() command.


1) Write a program to test login functionality gmail,facebook&

2) Complete the mail registration scenario?

2Write a program to click on links like Hindi, Bengali, Telugu in

2Write a program to click on links like Hindi, Bengali, Telugu by passing parameter to the method.

Check out the top Selenium Interview Questions now!

Prog:-  Package selenium rc;

Import com.throughworth.selenium.defaultselenium;

Public class googlelanguages-parameter{

Public defaultselenium selenium = new defaultselenium(“localhost”,1234,”firefox”,”//http:”)

Public void open url(){

Selenium.start();; Selenium.windowmaximize();


Public void click languages(string str){“link=”+str);

Selenium.waitforpage to load(“3000”);“link=English”);


Public static void main(string[] args){

Googlelanguages-parameter g=new googlelanguages-parameter(); url(); language(“hindi”); language(“Bengali”); language(“telugu”);


For an In-depth knowledge on Selenium, click on below