Tuesday, August 2, 2016

How to select value from drop down box

You  can select through 3 method:
1. SelectByVisibleText
2. selectByIndex
3. selectByValue

First identifie the drop down box
Select dropdown = new Select(driver.findElement(By.id("<>")));

To select its option say 'Programmer' you can do
dropdown.selectByVisibleText("Programmer ");



Monday, August 1, 2016

How to perform drag & Drop

First locate the source and destination e.g
webElement gsource = driver.findelement(by.id(“<>”));
webElement gdestination = driver.findelement(by.id(“<>”));

Actions ac = new Actions(driver);

ac.dragAndDrop(gsource, gdestination).perform();

Thursday, July 28, 2016

FAQ of Selenium Webdriver

What is the difference between driver.Close() and driver.Quit () method?
Close() - It is used to close the browser or page currently which is having the focus. 

Quit() - It is used to shut down the web driver instance or destroy the web driver instance (Close all the windows)

Selenium WebDriver - What is the difference between Assert and Verify?
Assert- it is used to verify the result. If the test case fail then it will stop the execution of the test case there itself and move the control to other test case.
Verify- it is also used to verify the result. If the test case fail then it will not stop the execution of that test case.

Selenium WebDriver - What is the difference between setSpeed() and sleep() methods?
Both will delay the speed of execution.
Thread.sleep () : It will stop the current (java) thread for the specified period of time. Its done only once
It takes a single argument in integer format
Ex: thread.sleep(2000)- It will wait for 2 seconds
It waits only once at the command given at sleep
SetSpeed () : For specific amount of time it will stop the execution for every selenium command.
It takes a single argument in integer format
Ex: selenium.setSpeed(“2000”)- It will wait for 2 seconds
Runs each command after setSpeed delay by the number of milliseconds mentioned in set Speed
This command is useful for demonstration purpose or if you are using a slow web application

Selenium WebDriver and Selenium IDE - What Selenium functionality uses wildcards?
Regular expression can use wildcards.

How do you get the current page URL ?

Wednesday, May 7, 2008

What is a checkpoint and what are different types of checkpoints?

Checkpoints allow you to compare the current behavior of the application being tested to its behavior in an earlier version. There are four types of checkpoints.
i. GUI checkpoints verify information about GUI objects. For example, you can check that a button is enabled or see which item is selected in a list.
ii. Bitmap checkpoints take a “snapshot” of a window or area of your application and compare this to an image captured in an earlier version.
iii. Text checkpoints read text in GUI objects and in bitmaps and enable you to verify their contents.
iv. Database checkpoints check the contents and the number of rows and columns of a result set, which is based on a query you create on your database.

Friday, April 11, 2008


Testing to ensure compatibility of an application or Web site with different browsers, OSs, and hardware platforms. Compatibility testing can be performed manually or can be driven by an automated functional or regression test suite.

Sunday, November 18, 2007

How to explain difference between v&v give the example

Have you ever prepared an "Egg Omelette"! I am assuming that you have prepared. So how will you prepare an "Egg Omelette"? You will try to get all the ingredients required for making an "Egg Omelette" like - eggs, oil, salt, onion, and the other ingredients if any! Then what will you do? You will "verify" the ingredients and see if they are of good enough "quality" and in proper "quantity". Won't you? Here you are doing Verification.

Now let me assume that you have prepared "Egg Omelette". Now will you directly serve it to your guests? Or you would like to "taste" it to see if it has been prepared well? A good cook will choose to taste the dish before serving it to guests. This is comparable to Validation.