About - Selenium

Definition

Development and Versions

Pre-requisites

Languages supported

Manual vs Automation

Choosing Selenium

Selenium - Components

Selenium IDE

Selenium RC

Selenium WebDriver

Selenium Grid

QTP

Selenium vs QTP

Selenium - IDE

Features

Install and configure

Selenium - Webdriver

About WebDriver

install and configure

First test case

Web element

Element Locators

Example of locators

Chropath

Web driver commands

Eclipse and TestNG

About Eclipse

Choose and download

About TestNG

Testng installation on eclipse

Testng Annotations

Pass Fail and Skip test cases

Run test cases in batch

testng.xml - Explanation

testng grouping

Running tests parallely

dependsOnMethods

dependsOnGroups

Prioritization

Passing parameters

Data providers

Read data from excel

Ant - XSLT reports

Testng listeners

Cross browser testing

Page Object Model



Selenium Webdriver commands/operations
 
a) isDisplayed(); This command returns a boolean if the element is displayed in the browser window.
Example: driver.findElement(By.id ("userid")).isDisplayed();


b) isSelected(); This command returns a Boolean if the element is selected in the browser window. This command is performed on element which can be found by findElement(By.Id()) operation. That is findElement identifies any element on browser. By is a class which is used to identify the element by locators like id, name etc... which are already discussed.
Example: driver.findElement(By.id ("userid")).isSelected();


c) isEnabled() ; This command returns a Boolean if the element is enabled in the browser window.
Example: Example: driver.findElement(By.id ("userid")).isEnabled();


d) click () ; This command is used to perform click operations on the elements that allow click functionality.
Example: driver.findElement(By.id ("button")).click();


e) manage().window().maximize() ; This command maximizes the browser window.
Example: driver.manage().window().maximize();


f) Close () ; This command is used close the focused browser associated with the driver performed directly on driver object
Example: driver.close();


g) navigate().refresh() This command is used refresh the browser performed directly on driver object.
Example: driver.navigate().refresh();


h) get() This command is used to enter the address /URL specified in the method and opens the browser with specified URL.
Example: driver.get("http://www.google.com");


i) getPageSource() This command returns page source of the browser page which is a html.
Example: driver.getPageSource();


j) navigate().back() This command navigates back to the previous page based on the browser page history.
Example: driver.navigate().back();


k) getCurrentUrl(); This command returns URL of the browser page as a string. Example:
driver.get("http://www.google.com"); driver.currentUrl(); In this case it returns "http://www.google.com"


l) navigate().to(); This command navigates to the URL specified in the current browser window.
Example: driver.navigate().to("http://www.google.com");


m) navigate().forward() This command navigates forward to the next page based on the browser page history.
Example: driver.navigate().forward();


n) clear() ; This command is used to clear the content on the elements that allow clear functionality like edit box or text box or Text area box. This command is performed on element which can be found by findElement(By.Id()) operation. That is findElement identifies any element on browser. By is a class which is used to identify the element by locators like id, name etc... which are already discussed.
Example: driver.findElement(By.id ("userid")).clear();


o) sendKeys() ; This command is used to enter the content on the elements that allow writing functionality like edit box or text box or Text area box. This command is performed on element which can be found by findElement(By.Id()) operation. That is findElement identifies any element on browser. By is a class which is used to identify the element by locators like id, name etc. which are already discussed.
Example: driver.findElement(By.id ("userid")).sendKeys("username");


p) quit(); This command is used close all the browsers associated with the driver performed directly on driver object.
Example: driver.quit();

I conduct online tutions on Manual Testing, Selenium and the following. For more details contact anandaibmindia@gmail.com
Manual Testing - 1600/-           Selenium - 1600/-
           Jsp and Servlet -2000/-           Java training - 2000/-