Saturday 19 December 2015

Selenium Training Syllabus

Selenium Syllabus

Chapter 1 | Introduction to Selenium
·         Selenium Introduction  
·         Brief History      
·         Selenium Tool Suite       
·         Why Selenium  
·         Note on Browser & Environment Support           
·         Advantage of WebDriver             
·         Limitations of WebDriver
·         How to choose the right Selenium Tool for your need    
·         A short comparison of Selenium with QTP           
·         Selenium WebDriver Overview
·         Define a Test Strategy for Automation  
·         Pick a Programming Language   
·         Choose an Editor             

Chapter 2 | Configure Selenium WebDriver            
·         Install Java         
·         Install Eclipse    
·         Install Firefox, Firebug, FirePath               
·         Download Selenium-Server.jar File         
·         Configuring Selenium in Eclipse

 
Chapter 3 | Core java Introduction & OOPs concepts 
·         Features of Java              
·         Why Java for Selenium 
·         First Eclipse Project        
·         First Java program          
·         Comment           
·         Concept of class file       
·         Platform independence               
·         Data types in Java           
·         String class         
·         If statements    
·         Loops, Arrays and Functions      
·         Conditional and concatenation operators            
·         While Loop        
·         For Loops           
·         Single Dimensional Arrays           
·         Two Dimensional arrays               
·         Drawbacks of arrays      
·         What are Functions?     
·         Function Input Parameters         
·         Function Return Types 
·         Local Variables 
·         Global Variables              
·         Static and Non-Static Variables 
·         Static and Non-Static Functions
·         Creating Objects in Java               
·         Meaning of static            
·         Why is main method static?       
·         Object and Object References  
·         Call by reference and Value       
·         Constructors     
·         Usage of Objects in Selenium    
·         Concept of Inheritance
·         Interface            
·         Overloading and Overriding Functions
·         Example on inheritance               
·         Object Class      
·         Usage of Inheritance in Selenium            
·         Packages, Access Modifiers/ Exception Handling              
·         Relevance of Packages 
·         Creating Packages          
·         Accessing Classes across Packages          
·         Good Features of eclipse            
·         Accessing modifiers - Public, Private, Default, Protected               
·         Exception handing with try catch block  
·         Importance of exception handling          
·         Exception and Error       
·         Throwable Class              
·         Final and Finally               
·         Throw and Throws         
·         Different Types of Exceptions   
·         Need of exception handling in Selenium framework      
·         Collection API/Reflection API    
·         Introduction to Collections API 
·         ArrayLilst Class 
·         HashTable Class               
·         Using ArrayList and HashTable of Collection API in Selenium framework
·         Reflection API usage and importance    
·         String class and functions            
·         Reading Properties File in Java

Chapter 4 | Selenium IDE   
·         Installing Selenium IDE & Running
·         Features of Selenium IDE            
·         Create Test Case & Test Suite
·         Export code       
·         Recording Script              
·         Running, Pausing and debugging Script 
·         Running a script line by line        
·         Inserting commands in between script 
·         XPATHS and installing firebug to get XPATHS      
·         Wait Commands              
·         Verification and Assertions         
·         Should I use verify or assertion 
·         Echo, StoreEval and StoredVars Demystified
·         Regular Expressions in Selenium IDE

Chapter 5 | Selenium WebDriver     
·         Overview of Selenium WebDriver           
·         Why WebDriver               
·         Architecture of selenium WebDriver      
·         Why not RC       
·         Write First Selenium Script          
·         WebDriver Interface     
·         WebElement Interface 
·         How to Google out errors-Self sufficiency              


Chapter 6 | Object Locator         
·         Inspecting elements in Mozilla, Chrome and IE  
·         HTML language tags and attributes         
·         Various locator strategies            
·         Xpath   
·         Identifying WebElements using id, name, class 
·         Finding Xpaths to identify           
·         Absolute and complete Xpaths 
·         Creating customized Xpaths without firebug      
·         Css Selectors     
·         Generating own CssSelectors    
·         Performance of CssSelectors as compared to Xpaths     
·         Finding xpaths/cssselectors in different browsers - Mozilla, Chrome and IE         
·         Objects with same id/xpath/cssSelector              
·         What is class attribute?
·         Handling Dynamic objects/ids on the page          

Chapter 7 | Common Selenium Methods           
·         Selenium useful & Common methods

Chapter 8 | Working on Browsers
·         Working on Firefox
·         Working on Chrome
·         Working on IE

Chapter 9 | Working on Form Elements
·         Working on Text Field
·         Working on Label
·         Working on Checkbox
·         Working on Radio button
·         Working on combo box
·         Working on Date Calender
·         Working on Links
·         Extracting objects in bulk from web page
·         Working on frames

Chapter 10 | Introduction of Apache Maven
·         Why Apache Maven for Selenium           
·         Installing Maven              
·         Why POM.xml  
·         Configuration, properties in POM.xml   
·      

Chapter 11 | TestNG Framework          
·         What is TestNg 
·         Installing TestNg in Eclipse          
·         Why do we need TestNG in Selenium   
·         Advantage of TestNg over Junit               
·         TestNg annotations       
·         First test case using annotations              
·         Running test case through TestNG.xml 
·         Checking reports created by TestNG      
·         Creating sample test cases         
·         Listeners in TestNG        
·         Create customized HTML report              
·         Parameterization            
·         Understanding usage of annotations     
·         Running a Test in TestNg             
·         Batch Running of tests in TestNg              
·         Skipping Tests  
·         parameterizing Tests - DataProvider      
·         Assertions/Reporting Errors       
·         TestNg Reports
·         Using TestNg in Selenium            
·         Grouping test cases       
·         Setting priority of execution for test cases          
·         Putting Dataproviders for multiple tests in a single file   

Chapter 12 | Selenium Grid
·         What is Selenium Grid?
·         When to Use Selenium Grid?    
·         Grid 1.0 Vs Grid 2.0         
·         What is a Hub and Node?            
·         How to Install and Use Grid 2.0?               
·         Designing Test Scripts That Can Run on the Grid
·         Using the DesiredCapabilites Object      
·         Using the RemoteWebDriver Object      
·         Running a Sample Test Case on the Grid               

Chapter 13 | Working on Advance WebDriver
·         Working with different browsers without changing code              
·         Taking Screenshots of the web pages    
·         Implicit and Explicit waits             
·         PageLoadTimeout Property       
·         WebDriverWait Class     
·         WebDriver.Timeout Interface   
·         ExpectedCondition interface and ExpectedConditions class        
·         WaitUntil Condition       
·         Fluent Wait        
·         Managing Ajax based components         
·         Window Handles             
·         Managing tabbed windows in IE, Chrome and Mozilla    
·         Managing popups in IE, Chrome and Mozilla       
·         Closing windows             
·         Default Popups
·         Testing https websites / Managing certificate errors in https websites in IE, Chrome and              
·         Mouse movement with Selenium- Mouse Interface      
·         Handling Ajax Autosuggests       
·         Handling Google Ajax Autosuggests       
·         Handling Frames in Web Page   
·         Handling cookies             
·         More Examples on Webtables  


Chapter 14 | Introduction to Page Object Design Pattern  
·         Why POM          
·         What is POM
·         Advantages of POM      
·         How to implement POM
·         What is Page Factory
·         When to use POM
·         Designing POM classes

Chapter 15 | Framework Creation using Java, TestNG, POI, Maven, Jenkins, Selenium Grid
·         Overview of Page Object Design Framework 
·         Reading test data from XLS files
·         Creating properties file to store object details
·         Implementing WebDriverWait
·         Implementing keywords
·         Parameterizing test using DataProvider & XLS files
·         Repeating test with different data
·         Generating test reports
·         Emailing test reports


Wednesday 28 October 2015

What is Quick Test Professional Step Generator

The Step Generator box enables you to add steps that perform operations, using test object methods (for tests only), Utility object methods, or function calls. Go to Insert -> Step Generator or Press F7 on keyboard to enable Step Generator dialog box. 


Saturday 3 October 2015

Create selenium WebDriver project in eclipse with Apache maven

The Problem
I often see Selenium practitioners ask that I have downloaded necessary resources to work on Selenium WebDriver. But, What should be project structure, how to manage dependencies, How to do build  and test management etc.

A Solution
By leveraging Apache Maven in our test framework, we can manage entire life-cycle of a test project. It provides support to define project structure, download the project dependencies libraries automatically, build and test management etc. Maven allows us to get all the Selenium libraries files and their dependencies by configuring the pom.xml (POM – Project Object Model) file.

Let’s dig in with an example

An Example
We will use Eclipse IDE and Maven for building the Selenium WebDriver test framework.
  1. Launch the Eclipse IDE.
  2. Create a new project by selecting [File -> New -> Other] from Eclipse Main Menu.
  3. On the New dialog, select [Maven -> Maven Project] as shown in the following screenshot:

  1. Click on [Next], the New Maven Project dialog will be displayed. Select the [Create a simple project (skip archetype selection)] check-box and set everything to default and click on the Next button as shown in the following screenshot: 

  1. On the New Maven Project dialog box, enter base package name (like com.myproject.app) in Group Id and project name (like myproject) in Artifact Id textboxes. You can also add a name and description but it is optional. Set everything to default and click on the [Finish] button as shown in the following screenshot:


  1. Eclipse will create the myproject project with a structure (in Package Explorer) similar to the one shown in the following screenshot:

7.       
           7. The JRE version might change based on the Java version installed on your machine. 
              Right-click on JRE System Library [J2SE-1.5] and select the Properties option from the 
              menu.       
  1. Select pom.xml from Package Explorer. This will open the pom.xml file in the editor area with the Overview tab open. Select the pom.xml tab instead.
  2. Add the WebDriver and TestNG dependencies highlighted in the following code snippet, to pom.xml in the <project> node:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
         <modelVersion>4.0.0</modelVersion>
         <groupId>com.myproject.app</groupId>
         <artifactId>myproject</artifactId>
         <version>0.0.1-SNAPSHOT</version>
<dependencies>
     <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-server</artifactId>
        <version>2.42.2</version>
    </dependency>
   <dependency>
                  <groupId>org.testng</groupId>
                  <artifactId>testng</artifactId>
                  <version>6.8.8</version>
   <scope>test</scope>
   </dependency>
</dependencies>
  <build>
    <testResources>
      <testResource>
        <directory>src/test/resources</directory>
        <excludes>
          <exclude>**/*.java</exclude>
        </excludes>
      </testResource>
      <testResource>
        <directory>src/test/java</directory>
        <excludes>
          <exclude>**/*.java</exclude>
        </excludes>
      </testResource>
    </testResources>
   
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>
    </plugins>
    </build>
/project>

  1. Right click on pom.xml from Package Explorer & Select [Run As -> Maven Install]

Conclusion
If you'd like to see the code and example used in the above project, you can find them here.


Happy Testing!