EIEIOTECHNOVATION
← Training programmes

EIEIO / PROGRAMMING & DEVELOPMENT

SELENIUM - C# - Test Automation

Course outline

4 days

Duration

SELENIUM - C# - Test Automation

4 days

Objective

To achieve Test Automation using Selenium – C# and also designing a framework from scratch with CI/CD pipeline.

Prerequisite

This course is intended for beginners or intermediate testers, leads who need to develop or improve automation techniques using Selenium and framework design from scratch. While previous testing tool knowledge is not required, fundamental of testing knowledge is required.

Delivery Method

Focus will be on demonstrating the tool features and applying this on live web applications to ensure that the concepts are well understood. In addition to this, the participants are expected to write and execute scripts to build familiarity with the tool.

Lab Setup (Hardware & Software)

  • Laptop or Desktop machine with minimum 8 GB RAM and with Windows OS
  • Open Visual Studio installer from the start menu after the installation of Visual Studio and install .Net desktop development.
  • Access to visual studio NuGet package manager and Extensions and updates.
  • Open network to download libs/ browsers from online during the session.
  • Github Account

Outline

C# Programming

C# for Selenium

  • Architecture
  • C# first program basics
  • Classes and objects in C#
  • Constructor
  • Strings in C#
  • Coding Basics
  • Access Modifiers
  • Encapsulation
  • Method Overloading
  • Inheritance Concepts
  • Practical usage of Inheritance
  • Method Overriding (Runtime Polymorphism)
  • Abstract Concepts
  • Interface Concepts
  • Practical Usage of Interface
  • Collections
  • Exception Handling

Web Automation using Selenium WebDriver

Basic Concepts for first WebDriver program

  • WebDriver Interface explanation and Invoking Browser
  • Basic Methods of WebDriver
  • How to run tests in Google Chrome,Firefox,IE

Locator Techniques & Tools used

  • Preview Browser Addons overview to identify elements
  • Locator Techniques: Xpath, CSS, Javascript identification using advance plugin.

ADVANCED WAYS-locating objects

  • Writing Customized Xpath Using Attributes
  • Writing customized Xpath Using Tagnames Traversing
  • CSS Selectors locators

Techniques to automate Web UI

  • Handle Dynamic dropdowns with WebDriver API
  • Handling Static dropdowns with Select WebDriver API
  • Handling Checkboxes with WebDriver API
  • Handling radiobuttons with Customized Xpath
  • Handling radiobutton dynamically- real time examples
  • Types of Alerts present and Methods to handle them
  • Handling Alerts using WebDriver API
  • Web Elements Validation
  • End to End Practice Exercise

Techniques to automate ADVANCNED Web UI

  • Handling Ajax/Mouse Interactions
  • Actions class-real time example
  • Handling Multiple Windows
  • Window Handle concepts-real time example
  • Live Example on working with Child windows
  • Handling ul li Tags in Selenium
  • How to handle Frames?

Real Time Exercises (end to end Programming)

  • Test Cases- Practice Exercise
  • Exercise 1.1-Limiting WebDriver scope
  • Getting Count of links in the pages,sections
  • Testcase-Practice Exercise-2
  • Exercise 2.1-Dynamic data in Websites
  • Exercise 2.2-Dynamic Links Handling
  • Exercise 2.3-Validations & checkpoints

Practical problems and Methods to Handle them with Selenium

  • How to handle table Grids in webpage
  • Techniques used for table grid-Real time example
  • How to overcome Synchronization problems
  • Maximizing window and deleting cookies
  • Handling HTTPS certifications
  • How to troubleshoot if it is not invoking in firefox
  • Killing the Process and Cookies using Selenium
  • How to take Screenshots in Selenium

AutoIt

  • What is AutoIt?
  • Download and Install
  • Finding windows/ on screen Element with AutoIt
  • Writing scripts in AutoIt
  • Managing Operations in AutoIt

Framework Design 1: Hybrid framework will be designed from scratch.

Data driving from Excel

  • Nugets Download Instructions
  • Excel API Methods explanation
  • Program for Retrieving data from excel
  • Program for Updating data back to excel

Framework Part -1 – Nunit

  • Why NUnit and Its Advantages
  • NUnit Installation and Setup
  • NUnit Annotations Part
  • Prioritizing the tests using NUnit
  • Disabling Enabling the Testcases and putting Timeout
  • Including and excluding the Testcases from Execution
  • Importance of Groups in NUnit
  • Data driving Testing with NUnit
  • Parallel running of test cases
  • Report Generation

Framework Part -2 -Data driven Framework

  • Why we should not hard code the data?
  • How to write Global parameters with C# code
  • Data driving parameterization from Properties file
  • How to deal with Reusable Components

Framework Part 3 – Keyword Driven

  • Importance of keyword Driven
  • Scenarios where Keyword Driven can be used

Framework Part 4 – Modular Driven & Hybrid

  • Introduction to Hybrid Driven Framework
  • Constructing a project with live application
  • Data driving parameterization from Properties file
  • Keyword driving parameterization from Excel file
  • Organizing the Hybrid Driven Framework as per the standard
  • Understanding the Modular Driven with created project.

Framework Part 5 - Page Object Model

  • What is Page object model?
  • Creating Page object Constructor in classes
  • Practical Exercise explaining Page object Model

Reporting – Extent Report

File Architecture:

  • XML File Handling
  • JSON File Handling
  • Config file Handling

Command Line Options – NUnit framework

  • Running all test
  • Running test with category.
  • Running failed test case.
  • Other test control command line options

Database Connectivity and Test Scenarios

  • Establishing connection to database
  • Sql queries
  • Fetch Data
  • Add Data
  • Update Data
  • Compare Data
  • CURD operations on database using C#

Framework Design 2: BDD framework will be designed from scratch.

Section 1: Introduction to BDD

  • Understand about behavior driven approach
  • Why BDD is important for agile team
  • How to maximize code coverage?
  • How BDD is more useful?
  • Theory of Continuous Integration (CI): why is CI needed?

Section 2: BDD Basics 🡪 (Using General/Selenium Concepts)

  • Gherkin Syntax
  • Basic understanding of Keywords
  • Analogy to programming constructs e.g. loops, parameters etc.
  • Creating automation steps
  • Creating a Feature File
  • Creating Step definition and runner files
  • Adding Multiple scenarios in a Feature
  • Adding Parameterization
  • Creating Multiple Features and Step files
  • Adding List and Data tables
  • Adding Background
  • Executing Feature File
  • Fixing sync issues and adding validations
  • Generate and read report / summary

Section 3: BDD Advanced options

  • What is Page object model?
  • Creating Page object Constructor in classes
  • Practical Exercise explaining Page object Model
  • Framework - Page Factory with BDD
  • Creating Page Factory Project
  • Database Connection in SpecFlow framework
  • Architecture
  • Connecting to DB
  • CURD operations on database using C#

Section 4: Reports

  • Specflow Report with Nunit Framework
  • Extent Report
  • LivingDoc Report

GIT-Jenkins- CI-CD Tool

  • GIT Introduction
  • GIT Installation
  • Working with GIT
  • GIT Commands
  • GIT Extensions tool
  • Why Jenkins? & where it going to help us in Framework design?
  • Installing & Configuration of Jenkins
  • Creating Jenkins project and integrating Existing Framework
  • Running the Framework and Scheduling it from Jenkins
  • Building and Running the Framework using MSBuild and vstest.console in Jenkins
  • Scheduling Specflow project in Jenkins

Programme scope, delivery arrangements and suitability are confirmed during enquiry.