Selenium Automation Testing
Koding Tree offers two comprehensive programs: a Selenium Course and a Java Course, designed to take you from core programming fundamentals to advanced concepts like system architecture and multithreading.
Java course
MODULE 01 – Introduction to Java & Setup
Java Environment & Architecture
- JDK vs JRE vs JVM – what each component does and why all three matter
- How Java achieves platform independence – write once, run anywhere via bytecode
- Installing JDK and setting up Eclipse IDE for Java development
- Configuring
JAVA_HOMEand verifying withjava -version
First Java Program
- Structure of a Java class –
classkeyword,public static void main(String[] args) System.out.println()andSystem.out.print()– printing output to the console- Compiling with
javacand running withjavafrom the command line - Organising classes into
packages – naming conventions and folder structure
MODULE 02 – Data Types & Variables
Primitive Data Types
- Variable declaration and assignment – naming rules and conventions
- Integer types:
byte,short,int,long– size and valid range of each - Floating-point types:
floatvsdouble– precision and when to use each char– single Unicode character, stored as a 16-bit numberboolean–true/falseonly; used in all conditions and loopsString– non-primitive reference type; immutable character sequence
Type Conversion & Constants
finalkeyword – declaring a constant that cannot be reassigned- Widening (implicit) conversion – Java automatically promotes smaller types to larger
- Narrowing (explicit) casting –
(int) 3.14– data loss risk and when it is acceptable
MODULE 03 – Operators
Operator Types
- Arithmetic:
+,-,*,/,%(modulus) – integer division behaviour - Increment / Decrement:
++,--– prefix vs postfix difference - Relational:
==,!=,>,<,>=,<=– always returnboolean - Logical:
&&(AND),||(OR),!(NOT) – short-circuit evaluation - Assignment shortcuts:
+=,-=,*=,/=,%= - Ternary operator:
condition ? valueIfTrue : valueIfFalse
MODULE 04 – Control Flow – Conditional Statements
Conditional Statements
if,else,else ifladder – single and multi-branch decision making- Nested
if– conditions inside conditions for complex logic switchstatement –case,default, andbreak; fall-through behaviourScannerclass –nextInt(),nextLine(),nextDouble()for reading user input
MODULE 05 – Loops & Pattern Printing
Loop Types & Control Statements
forloop – initialisation, condition, update; most common for counted iterationswhileloop – condition checked before each iteration; runs zero or more timesdo-whileloop – condition checked after; always executes at least oncebreak– immediately exits the current loopcontinue– skips the rest of the current iteration and moves to the next- Nested loops – outer loop controls rows, inner loop controls columns
Pattern Printing
- Star (
*) patterns – right triangle, left triangle, pyramid, diamond - Number patterns – sequential, mirrored, and Pascal’s triangle style
- Analysing patterns – how to break any design into row count and column logic
MODULE 06 – Arrays – 1D & 2D
1D Arrays
- Array declaration:
int[] arr = new int[5]– fixed size, zero-indexed - Initialisation at declaration:
int[] arr = {10, 20, 30} arr.length– getting the size of an array- Iterating with
forloop and enhancedfor-eachloop - Common operations: finding max/min, sum, average, reverse, search
Arrays.sort()– sorting in ascending order
2D Arrays
- Declaration:
int[][] matrix = new int[rows][cols]– row-major storage - Nested loops to traverse rows and columns of a 2D array
- Matrix operations – addition, transpose, diagonal sum
MODULE 07 – Methods
Defining & Using Methods
- Method signature: access modifier, return type, method name, parameter list
- Calling a method – passing arguments, receiving return values
voidmethods vs methods with areturntypestaticmethods – called on the class directly without creating an object- Instance (non-static) methods – require an object to call
- Method overloading – same name, different parameter types or count
- Writing generic, reusable utility methods for common operations
MODULE 08 – OOP – Classes, Objects & Constructors
Classes & Objects
- Class as a blueprint – instance variables (fields) and instance methods
- Creating objects:
ClassName obj = new ClassName() - Default constructor – auto-provided by Java when no constructor is defined
- Parameterised constructor – initialising objects with values at creation time
thiskeyword – resolving naming conflicts between parameters and instance fields
static & final Members
staticvariable – one copy shared across all instances of a classstaticmethod – belongs to the class, not to any objectfinalvariable – constant; must be assigned exactly oncefinalmethod – cannot be overridden by a subclassfinalclass – cannot be extended (e.g.,Stringis a final class)
MODULE 09 – OOP – Inheritance & Encapsulation
Inheritance
extendskeyword – child class inherits all non-private members of the parentsuperkeyword – calling the parent class constructor or methods- Types: single inheritance, multilevel inheritance, hierarchical inheritance
- Java does not support multiple class inheritance – why, and how interfaces solve this
Encapsulation & Access Modifiers
private,protected,public, package-private – scope of each- Encapsulation pattern –
privatefields withpublicgetter and setter methods - Why encapsulation prevents invalid state and makes code easier to maintain
- Method overloading – same method name, different parameter signature
MODULE 10 – OOP – Polymorphism & Type Casting
Method Overriding & Runtime Polymorphism
- Method overriding – child class provides its own implementation of a parent method
@Overrideannotation – compile-time check that overriding is valid- Runtime (dynamic) polymorphism – method resolved at runtime based on actual object type
- Overloading vs overriding – compile-time vs runtime; key differences interviewers test
Object Type Casting
- Upcasting – implicit;
Animal a = new Dog()– always safe - Downcasting – explicit;
Dog d = (Dog) a– requiresinstanceofcheck instanceofoperator – safely checking type before casting
MODULE 11 – Interfaces & Abstract Classes
Interfaces
interfacekeyword – defines a contract of method signatures without implementationimplementskeyword – a class agrees to provide all interface methods- Interface methods are implicitly
public abstract, fields arepublic static final - A class can implement multiple interfaces – Java’s answer to multiple inheritance
Abstract Classes
abstract class– cannot be instantiated; must be subclassedabstractmethod – declared without a body; subclass must provide implementation- Can contain both abstract methods and fully implemented (concrete) methods
- Interface vs abstract class – when to use each; key differences for interviews
MODULE 12 – String Handling
String Class & Key Methods
Stringis immutable – every operation creates a new object in the String Poollength(),charAt(int),indexOf(String),lastIndexOf()substring(int start),substring(int start, int end)toUpperCase(),toLowerCase(),trim()replace(),contains(),startsWith(),endsWith()equals()vsequalsIgnoreCase()vs==– why==compares references, not contentsplit(String regex),join(),toCharArray()
StringBuilder & StringBuffer
StringBuilder– mutable, not thread-safe, faster for single-threaded useappend(),insert(),delete(),reverse(),toString()StringBuffer– mutable, thread-safe, used in multi-threaded programsStringvsStringBuildervsStringBuffer– performance and thread-safety trade-offs
MODULE 13 – Collections Framework
List – Ordered, Allows Duplicates
ArrayList– dynamic array; fast random access; allows duplicates; maintains insertion orderLinkedList– doubly-linked list; fastadd/removeat ends; slower random access- Common methods:
add(),get(int),remove(),size(),contains(),set() - Iterating with
for-eachandIterator
Set – No Duplicates
HashSet– no duplicates, no guaranteed order; backed by a hash tableLinkedHashSet– no duplicates, preserves insertion orderTreeSet– no duplicates, elements stored in natural sorted order
Queue & Stack
Queueinterface – FIFO;offer(),poll(),peek()Stack– LIFO;push(),pop(),peek()Vector– legacy thread-safe version ofArrayList
Map – Key-Value Pairs
HashMap– key-value pairs, no guaranteed order, allows onenullkeyLinkedHashMap– key-value pairs, preserves insertion order- Common methods:
put(),get(),remove(),containsKey(),keySet(),values()
Sorting & Iteration
Comparableinterface –compareTo()for natural ordering inside the classComparatorinterface –compare()for custom ordering defined outside the classCollections.sort(list)andCollections.sort(list, comparator)Iterator–hasNext()andnext()for safe manual traversal
MODULE 14 – Exception Handling
Exception Handling Mechanism
- What is an exception – an unexpected event that disrupts normal program execution
- Checked vs unchecked exceptions – compile-time vs runtime
tryblock – code that may throw an exceptioncatch (ExceptionType e)– handling a specific exception type- Multiple
catchblocks – handling different exception types separately finallyblock – always executes; used for resource cleanup (closing files, connections)throwkeyword – manually throwing an exception from your codethrowskeyword – declaring that a method may throw a checked exception- Common exceptions:
NullPointerExceptionArrayIndexOutOfBoundsExceptionNumberFormatExceptionArithmeticException
MODULE 13 – Collections Framework
List – Ordered, Allows Duplicates
ArrayList– dynamic array; fast random access; allows duplicates; maintains insertion orderLinkedList– doubly-linked list; fastadd/removeat ends; slower random access- Common methods:
add(),get(int),remove(),size(),contains(),set() - Iterating with
for-eachandIterator
Set – No Duplicates
HashSet– no duplicates, no guaranteed order; backed by a hash tableLinkedHashSet– no duplicates, preserves insertion orderTreeSet– no duplicates, elements stored in natural sorted order
Queue & Stack
Queueinterface – FIFO;offer(),poll(),peek()Stack– LIFO;push(),pop(),peek()Vector– legacy thread-safe version ofArrayList
Map – Key-Value Pairs
HashMap– key-value pairs, no guaranteed order, allows onenullkeyLinkedHashMap– key-value pairs, preserves insertion order- Common methods:
put(),get(),remove(),containsKey(),keySet(),values()
Sorting & Iteration
Comparableinterface –compareTo()for natural ordering inside the classComparatorinterface –compare()for custom ordering defined outside the classCollections.sort(list)andCollections.sort(list, comparator)Iterator–hasNext()andnext()for safe manual traversal
Selenium course
MODULE 01 – Environment Setup & Selenium WebDriver Introduction
Tools & Setup
- Installing Java JDK, Eclipse IDE, and configuring environment variables
- Creating a Maven project and understanding
pom.xmlstructure - Adding Selenium WebDriver dependency via Maven Central
- Setting up ChromeDriver, GeckoDriver (Firefox), and EdgeDriver
WebDriver Fundamentals
- Understanding the Selenium architecture – how WebDriver communicates with browsers
- Instantiating
WebDriverfor Chrome, Firefox, and Edge browsers - Writing and running your first automation script end-to-end
- Understanding the difference between Selenium 3 and Selenium 4
MODULE 02 – Browser Control & Navigation
WebDriver Browser Commands
driver.get()anddriver.navigate().to()– loading URLsnavigate().back(),navigate().forward(),navigate().refresh()driver.manage().window().maximize(),setSize(),setPosition()driver.getTitle()anddriver.getCurrentUrl()for page verificationdriver.quit()vsdriver.close()– when to use each
MODULE 03 – Web Element Locator Strategies
💡 Locators are how your script finds elements on a page. Mastering all 8 strategies means you can automate any website, no matter how it is built.
All 8 Locator Types
By.id– fastest and most reliable when availableBy.name– using the HTML name attributeBy.className– single CSS class targetingBy.tagName– selecting by HTML element typeBy.linkText– exact anchor text matchingBy.partialLinkText– partial anchor text matchingBy.cssSelector– powerful CSS-based targetingBy.xpath– most flexible, works anywhere in the DOM
MODULE 04 – CSS Selector & XPath – In Depth
💡 CSS Selectors and XPath are the two most powerful locator types. Knowing both in depth allows you to find any element — even in the most complex web pages.
CSS Selector Techniques
- Tag, ID, class, and attribute-based CSS selectors
- Combining multiple attributes:
input[type='text'][name='email'] - Child and descendant selectors, sibling selectors
:nth-child(),^=,$=,*=– starts-with, ends-with, contains patterns
XPath Techniques
- Absolute XPath vs Relative XPath – differences and when to use each
- XPath with attributes:
//tag[@attribute='value'] contains(),starts-with(),text()functions- XPath axes:
parent,child,following-sibling,preceding-sibling,ancestor - Grouping and index-based XPath:
(//tag)[2] - AND / OR logical operators in XPath expressions
MODULE 05 – WebElement Interactions
💡 Once you find an element, you need to interact with it – type, click, read values. These are the core actions every automation script performs.
WebElement Action Methods
sendKeys()– typing into text fields and input boxesclick()– clicking buttons, links, checkboxes, and radio buttonsclear()– clearing existing text from input fieldssubmit()– submitting forms directly
WebElement Property Methods
isSelected()– checking state of checkboxes and radio buttonsisEnabled()– verifying if a field or button is activeisDisplayed()– checking if an element is visible on screengetText()– reading the visible text of any elementgetAttribute()– reading any HTML attribute valuegetCssValue()– reading applied CSS property values
MODULE 06 – Actions Class & Screenshots
💡 Many modern websites require mouse gestures and keyboard combos that a simple click cannot handle. The Actions class and screenshot tools cover exactly these scenarios.
Actions Class – Advanced Mouse & Keyboard
moveToElement()– hovering over menus and tooltipsdoubleClick()andcontextClick()(right-click)dragAndDrop()anddragAndDropBy()- Keyboard actions:
keyDown(Keys.SHIFT),keyUp(),sendKeys(Keys.ENTER) - Scroll actions using
scrollToElement()andscrollByAmount()(Selenium 4) build().perform()– chaining and executing action sequences
Capturing Screenshots
TakesScreenshotinterface – full-page screenshot on test failure- Element-level screenshot using
WebElement.getScreenshotAs() - AShot library – for full-page scrolling screenshots
- JavaScript Executor-based screenshot approach
MODULE 07 – Handling Windows, Tabs & Frames
💡 Real applications open pop-ups, new tabs, and embed content in frames. Knowing how to switch between them keeps your scripts from getting stuck.
Window & Tab Handling
driver.getWindowHandle()– capturing the current window referencedriver.getWindowHandles()– getting all open window/tab referencesdriver.switchTo().window(handle)– switching between windows and tabs- Opening a new tab using Selenium 4’s
newWindow(WindowType.TAB) - Closing child windows and returning to the parent window
Frame & Alert Handling
driver.switchTo().frame()– switching by index, name, or WebElementdriver.switchTo().defaultContent()– returning to the main pagedriver.switchTo().alert()– handling JavaScript alerts and confirmsalert.accept(),alert.dismiss(), andalert.sendKeys()
MODULE 08 – Handling Dropdowns & Multiple Elements
💡 Dropdowns and lists of elements appear in almost every real application. These tools give you precise control over selecting values and working with element collections.
Select Class – Dropdown Handling
- Importing and using the
Selectclass from Selenium support selectByVisibleText(),selectByValue(),selectByIndex()getOptions(),getAllSelectedOptions(),getFirstSelectedOption()- Handling multi-select dropdowns with
deselectAll()
Working with Multiple Elements
driver.findElements()– returning aList<WebElement>- Iterating over element lists to validate data or perform bulk actions
- Counting elements, checking presence, filtering by state
MODULE 09 – Synchronization & Wait Strategies
💡 Timing issues cause most automation failures. Proper synchronization makes your scripts reliable — even on slow networks or dynamic pages that load asynchronously.
Wait Types
Thread.sleep()– static wait (why it should be avoided in real scripts)driver.manage().timeouts().implicitlyWait()– global element search timeoutWebDriverWaitwithExpectedConditions– explicit conditional waits- Key conditions:
visibilityOfElementLocatedelementToBeClickabletextToBePresentInElementalertIsPresent
FluentWait– polling interval, custom timeout, ignoring exceptions- Choosing the right wait strategy for different application behaviours
MODULE 10 – Page Object Model (POM) Design Pattern
💡 POM is the industry-standard way to organise automation code. It separates locators from test logic — making scripts easier to maintain when the UI changes.
POM Architecture
- Why POM exists – separation of page logic from test logic
- Creating Page classes with locators and action methods
@FindByannotation – declaring locators declarativelyPageFactory.initElements(driver, this)– initialising page elements- Structuring a multi-page project: LoginPage, HomePage, CartPage, etc.
Common Issues & Fixes
- Understanding and handling
StaleElementReferenceException - Lazy initialisation vs eager initialisation of page elements
- Reusing page objects across multiple test classes
MODULE 11 – TestNG Framework & Assertions
💡 TestNG is the test management backbone of most Selenium projects. It controls the order, grouping, and reporting of your tests — making your suite production-quality.
TestNG Annotations & Configuration
- Core annotations:
@Test,@BeforeMethod,@AfterMethod,@BeforeClass,@AfterClass,@BeforeSuite,@AfterSuite - Test grouping with
groupsattribute – running smoke vs regression sets - Parameterisation using
@Parametersandtestng.xmlconfiguration - Data-driven testing using
@DataProvider - Parallel test execution – configuring thread count in
testng.xml - Test priority, dependency (
dependsOnMethods), and enabled flag - Custom logging using
Reporter.log()inside test methods
Assertions
- Hard assertions with
Assert– test stops immediately on failure - Soft assertions with
SoftAssert– collect all failures, report at end - Common assertion methods:
assertEquals,assertTrue,assertFalse,assertNull,assertNotNull - Choosing between hard and soft assertions based on test scenario
MODULE 12 – Data-Driven Testing with Apache POI
💡 Data-driven testing lets one script run across hundreds of input combinations stored in an Excel sheet — a standard practice in enterprise QA teams.
Apache POI – Excel Integration
- Adding Apache POI dependency to
pom.xmlfor.xlsxsupport XSSFWorkbook,XSSFSheet,XSSFRow,XSSFCell– reading the Excel object hierarchy- Reading test data row-by-row from an Excel file into test scripts
- Handling different cell types: String, Numeric, Boolean, Formula
- Writing test results (Pass/Fail) back into the Excel sheet
- Building a reusable
ExcelUtilsutility class for the framework
MODULE 13 – Automation Framework, Selenium Grid & Jenkins CI/CD
💡 This module brings everything together into a production-level framework — the kind you will actually work with inside a software company.
Framework Design (AFW)
- Recommended folder structure:
src/mainfor utilities,src/testfor test scripts - Building a
BaseTestclass – centralised driver initialisation and teardown - Integrating POM page classes, Excel utilities, and TestNG configuration
- Maven Surefire Plugin – triggering test suites from command line
- Version control with GitHub – pushing the project, branching basics
Selenium Grid & Cross-Browser Testing
- Selenium Grid architecture – Hub and Node setup for distributed execution
RemoteWebDriver– running tests on remote machines and browsers- Cloud-based grid execution using SauceLabs
- Configuring browser capabilities for parallel cross-browser runs
Jenkins CI/CD Integration
- Installing and configuring Jenkins for a Java/Maven project
- Creating a Jenkins job linked to a GitHub repository
- Scheduling automated test runs using cron-style build triggers
- Viewing TestNG reports and build history inside Jenkins dashboard
MODULE 14 – Exception Handling
Exception Handling Mechanism
- What is an exception – an unexpected event that disrupts normal program execution
- Checked vs unchecked exceptions – compile-time vs runtime
tryblock – code that may throw an exceptioncatch (ExceptionType e)– handling a specific exception type- Multiple
catchblocks – handling different exception types separately finallyblock – always executes; used for resource cleanup (closing files, connections)throwkeyword – manually throwing an exception from your codethrowskeyword – declaring that a method may throw a checked exception- Common exceptions:
NullPointerExceptionArrayIndexOutOfBoundsExceptionNumberFormatExceptionArithmeticException
MODULE 13 – Collections Framework
List – Ordered, Allows Duplicates
ArrayList– dynamic array; fast random access; allows duplicates; maintains insertion orderLinkedList– doubly-linked list; fastadd/removeat ends; slower random access- Common methods:
add(),get(int),remove(),size(),contains(),set() - Iterating with
for-eachandIterator
Set – No Duplicates
HashSet– no duplicates, no guaranteed order; backed by a hash tableLinkedHashSet– no duplicates, preserves insertion orderTreeSet– no duplicates, elements stored in natural sorted order
Queue & Stack
Queueinterface – FIFO;offer(),poll(),peek()Stack– LIFO;push(),pop(),peek()Vector– legacy thread-safe version ofArrayList
Map – Key-Value Pairs
HashMap– key-value pairs, no guaranteed order, allows onenullkeyLinkedHashMap– key-value pairs, preserves insertion order- Common methods:
put(),get(),remove(),containsKey(),keySet(),values()
Sorting & Iteration
Comparableinterface –compareTo()for natural ordering inside the classComparatorinterface –compare()for custom ordering defined outside the classCollections.sort(list)andCollections.sort(list, comparator)Iterator–hasNext()andnext()for safe manual traversal
Selenium Automation Testing
Koding Tree offers two comprehensive programs: a Selenium Course and a Java Course, designed to take you from core programming fundamentals to advanced concepts like system architecture and multithreading.
Java course
MODULE 01 – Introduction to Java & Setup
Java Environment & Architecture
- JDK vs JRE vs JVM – what each component does and why all three matter
- How Java achieves platform independence – write once, run anywhere via bytecode
- Installing JDK and setting up Eclipse IDE for Java development
- Configuring
JAVA_HOMEand verifying withjava -version
First Java Program
- Structure of a Java class –
classkeyword,public static void main(String[] args) System.out.println()andSystem.out.print()– printing output to the console- Compiling with
javacand running withjavafrom the command line - Organising classes into
packages – naming conventions and folder structure
MODULE 02 – Data Types & Variables
Primitive Data Types
- Variable declaration and assignment – naming rules and conventions
- Integer types:
byte,short,int,long– size and valid range of each - Floating-point types:
floatvsdouble– precision and when to use each char– single Unicode character, stored as a 16-bit numberboolean–true/falseonly; used in all conditions and loopsString– non-primitive reference type; immutable character sequence
Type Conversion & Constants
finalkeyword – declaring a constant that cannot be reassigned- Widening (implicit) conversion – Java automatically promotes smaller types to larger
- Narrowing (explicit) casting –
(int) 3.14– data loss risk and when it is acceptable
MODULE 03 – Operators
Operator Types
- Arithmetic:
+,-,*,/,%(modulus) – integer division behaviour - Increment / Decrement:
++,--– prefix vs postfix difference - Relational:
==,!=,>,<,>=,<=– always returnboolean - Logical:
&&(AND),||(OR),!(NOT) – short-circuit evaluation - Assignment shortcuts:
+=,-=,*=,/=,%= - Ternary operator:
condition ? valueIfTrue : valueIfFalse
MODULE 04 – Control Flow – Conditional Statements
Conditional Statements
if,else,else ifladder – single and multi-branch decision making- Nested
if– conditions inside conditions for complex logic switchstatement –case,default, andbreak; fall-through behaviourScannerclass –nextInt(),nextLine(),nextDouble()for reading user input
MODULE 05 – Loops & Pattern Printing
Loop Types & Control Statements
forloop – initialisation, condition, update; most common for counted iterationswhileloop – condition checked before each iteration; runs zero or more timesdo-whileloop – condition checked after; always executes at least oncebreak– immediately exits the current loopcontinue– skips the rest of the current iteration and moves to the next- Nested loops – outer loop controls rows, inner loop controls columns
Pattern Printing
- Star (
*) patterns – right triangle, left triangle, pyramid, diamond - Number patterns – sequential, mirrored, and Pascal’s triangle style
- Analysing patterns – how to break any design into row count and column logic
MODULE 06 – Arrays – 1D & 2D
1D Arrays
- Array declaration:
int[] arr = new int[5]– fixed size, zero-indexed - Initialisation at declaration:
int[] arr = {10, 20, 30} arr.length– getting the size of an array- Iterating with
forloop and enhancedfor-eachloop - Common operations: finding max/min, sum, average, reverse, search
Arrays.sort()– sorting in ascending order
2D Arrays
- Declaration:
int[][] matrix = new int[rows][cols]– row-major storage - Nested loops to traverse rows and columns of a 2D array
- Matrix operations – addition, transpose, diagonal sum
MODULE 07 – Methods
Defining & Using Methods
- Method signature: access modifier, return type, method name, parameter list
- Calling a method – passing arguments, receiving return values
voidmethods vs methods with areturntypestaticmethods – called on the class directly without creating an object- Instance (non-static) methods – require an object to call
- Method overloading – same name, different parameter types or count
- Writing generic, reusable utility methods for common operations
MODULE 08 – OOP – Classes, Objects & Constructors
Classes & Objects
- Class as a blueprint – instance variables (fields) and instance methods
- Creating objects:
ClassName obj = new ClassName() - Default constructor – auto-provided by Java when no constructor is defined
- Parameterised constructor – initialising objects with values at creation time
thiskeyword – resolving naming conflicts between parameters and instance fields
static & final Members
staticvariable – one copy shared across all instances of a classstaticmethod – belongs to the class, not to any objectfinalvariable – constant; must be assigned exactly oncefinalmethod – cannot be overridden by a subclassfinalclass – cannot be extended (e.g.,Stringis a final class)
MODULE 09 – OOP – Inheritance & Encapsulation
Inheritance
extendskeyword – child class inherits all non-private members of the parentsuperkeyword – calling the parent class constructor or methods- Types: single inheritance, multilevel inheritance, hierarchical inheritance
- Java does not support multiple class inheritance – why, and how interfaces solve this
Encapsulation & Access Modifiers
private,protected,public, package-private – scope of each- Encapsulation pattern –
privatefields withpublicgetter and setter methods - Why encapsulation prevents invalid state and makes code easier to maintain
- Method overloading – same method name, different parameter signature
MODULE 10 – OOP – Polymorphism & Type Casting
Method Overriding & Runtime Polymorphism
- Method overriding – child class provides its own implementation of a parent method
@Overrideannotation – compile-time check that overriding is valid- Runtime (dynamic) polymorphism – method resolved at runtime based on actual object type
- Overloading vs overriding – compile-time vs runtime; key differences interviewers test
Object Type Casting
- Upcasting – implicit;
Animal a = new Dog()– always safe - Downcasting – explicit;
Dog d = (Dog) a– requiresinstanceofcheck instanceofoperator – safely checking type before casting
MODULE 11 – Interfaces & Abstract Classes
Interfaces
interfacekeyword – defines a contract of method signatures without implementationimplementskeyword – a class agrees to provide all interface methods- Interface methods are implicitly
public abstract, fields arepublic static final - A class can implement multiple interfaces – Java’s answer to multiple inheritance
Abstract Classes
abstract class– cannot be instantiated; must be subclassedabstractmethod – declared without a body; subclass must provide implementation- Can contain both abstract methods and fully implemented (concrete) methods
- Interface vs abstract class – when to use each; key differences for interviews
MODULE 12 – String Handling
String Class & Key Methods
Stringis immutable – every operation creates a new object in the String Poollength(),charAt(int),indexOf(String),lastIndexOf()substring(int start),substring(int start, int end)toUpperCase(),toLowerCase(),trim()replace(),contains(),startsWith(),endsWith()equals()vsequalsIgnoreCase()vs==– why==compares references, not contentsplit(String regex),join(),toCharArray()
StringBuilder & StringBuffer
StringBuilder– mutable, not thread-safe, faster for single-threaded useappend(),insert(),delete(),reverse(),toString()StringBuffer– mutable, thread-safe, used in multi-threaded programsStringvsStringBuildervsStringBuffer– performance and thread-safety trade-offs
MODULE 13 – Collections Framework
List – Ordered, Allows Duplicates
ArrayList– dynamic array; fast random access; allows duplicates; maintains insertion orderLinkedList– doubly-linked list; fastadd/removeat ends; slower random access- Common methods:
add(),get(int),remove(),size(),contains(),set() - Iterating with
for-eachandIterator
Set – No Duplicates
HashSet– no duplicates, no guaranteed order; backed by a hash tableLinkedHashSet– no duplicates, preserves insertion orderTreeSet– no duplicates, elements stored in natural sorted order
Queue & Stack
Queueinterface – FIFO;offer(),poll(),peek()Stack– LIFO;push(),pop(),peek()Vector– legacy thread-safe version ofArrayList
Map – Key-Value Pairs
HashMap– key-value pairs, no guaranteed order, allows onenullkeyLinkedHashMap– key-value pairs, preserves insertion order- Common methods:
put(),get(),remove(),containsKey(),keySet(),values()
Sorting & Iteration
Comparableinterface –compareTo()for natural ordering inside the classComparatorinterface –compare()for custom ordering defined outside the classCollections.sort(list)andCollections.sort(list, comparator)Iterator–hasNext()andnext()for safe manual traversal
MODULE 14 – Exception Handling
Exception Handling Mechanism
- What is an exception – an unexpected event that disrupts normal program execution
- Checked vs unchecked exceptions – compile-time vs runtime
tryblock – code that may throw an exceptioncatch (ExceptionType e)– handling a specific exception type- Multiple
catchblocks – handling different exception types separately finallyblock – always executes; used for resource cleanup (closing files, connections)throwkeyword – manually throwing an exception from your codethrowskeyword – declaring that a method may throw a checked exception- Common exceptions:
NullPointerExceptionArrayIndexOutOfBoundsExceptionNumberFormatExceptionArithmeticException
Selenium course
MODULE 01 – Environment Setup & Selenium WebDriver Introduction
Tools & Setup
- Installing Java JDK, Eclipse IDE, and configuring environment variables
- Creating a Maven project and understanding
pom.xmlstructure - Adding Selenium WebDriver dependency via Maven Central
- Setting up ChromeDriver, GeckoDriver (Firefox), and EdgeDriver
WebDriver Fundamentals
- Understanding the Selenium architecture – how WebDriver communicates with browsers
- Instantiating
WebDriverfor Chrome, Firefox, and Edge browsers - Writing and running your first automation script end-to-end
- Understanding the difference between Selenium 3 and Selenium 4
MODULE 02 – Browser Control & Navigation
WebDriver Browser Commands
driver.get()anddriver.navigate().to()– loading URLsnavigate().back(),navigate().forward(),navigate().refresh()driver.manage().window().maximize(),setSize(),setPosition()driver.getTitle()anddriver.getCurrentUrl()for page verificationdriver.quit()vsdriver.close()– when to use each
MODULE 03 – Web Element Locator Strategies
💡 Locators are how your script finds elements on a page. Mastering all 8 strategies means you can automate any website, no matter how it is built.
All 8 Locator Types
By.id– fastest and most reliable when availableBy.name– using the HTML name attributeBy.className– single CSS class targetingBy.tagName– selecting by HTML element typeBy.linkText– exact anchor text matchingBy.partialLinkText– partial anchor text matchingBy.cssSelector– powerful CSS-based targetingBy.xpath– most flexible, works anywhere in the DOM
MODULE 04 – CSS Selector & XPath – In Depth
💡 CSS Selectors and XPath are the two most powerful locator types. Knowing both in depth allows you to find any element — even in the most complex web pages.
CSS Selector Techniques
- Tag, ID, class, and attribute-based CSS selectors
- Combining multiple attributes:
input[type='text'][name='email'] - Child and descendant selectors, sibling selectors
:nth-child(),^=,$=,*=– starts-with, ends-with, contains patterns
XPath Techniques
- Absolute XPath vs Relative XPath – differences and when to use each
- XPath with attributes:
//tag[@attribute='value'] contains(),starts-with(),text()functions- XPath axes:
parent,child,following-sibling,preceding-sibling,ancestor - Grouping and index-based XPath:
(//tag)[2] - AND / OR logical operators in XPath expressions
MODULE 05 – WebElement Interactions
💡 Once you find an element, you need to interact with it – type, click, read values. These are the core actions every automation script performs.
WebElement Action Methods
sendKeys()– typing into text fields and input boxesclick()– clicking buttons, links, checkboxes, and radio buttonsclear()– clearing existing text from input fieldssubmit()– submitting forms directly
WebElement Property Methods
isSelected()– checking state of checkboxes and radio buttonsisEnabled()– verifying if a field or button is activeisDisplayed()– checking if an element is visible on screengetText()– reading the visible text of any elementgetAttribute()– reading any HTML attribute valuegetCssValue()– reading applied CSS property values
MODULE 06 – Actions Class & Screenshots
💡 Many modern websites require mouse gestures and keyboard combos that a simple click cannot handle. The Actions class and screenshot tools cover exactly these scenarios.
Actions Class – Advanced Mouse & Keyboard
moveToElement()– hovering over menus and tooltipsdoubleClick()andcontextClick()(right-click)dragAndDrop()anddragAndDropBy()- Keyboard actions:
keyDown(Keys.SHIFT),keyUp(),sendKeys(Keys.ENTER) - Scroll actions using
scrollToElement()andscrollByAmount()(Selenium 4) build().perform()– chaining and executing action sequences
Capturing Screenshots
TakesScreenshotinterface – full-page screenshot on test failure- Element-level screenshot using
WebElement.getScreenshotAs() - AShot library – for full-page scrolling screenshots
- JavaScript Executor-based screenshot approach
MODULE 07 – Handling Windows, Tabs & Frames
💡 Real applications open pop-ups, new tabs, and embed content in frames. Knowing how to switch between them keeps your scripts from getting stuck.
Window & Tab Handling
driver.getWindowHandle()– capturing the current window referencedriver.getWindowHandles()– getting all open window/tab referencesdriver.switchTo().window(handle)– switching between windows and tabs- Opening a new tab using Selenium 4’s
newWindow(WindowType.TAB) - Closing child windows and returning to the parent window
Frame & Alert Handling
driver.switchTo().frame()– switching by index, name, or WebElementdriver.switchTo().defaultContent()– returning to the main pagedriver.switchTo().alert()– handling JavaScript alerts and confirmsalert.accept(),alert.dismiss(), andalert.sendKeys()
MODULE 08 – OOP – Classes, Objects & Constructors
Classes & Objects
- Class as a blueprint – instance variables (fields) and instance methods
- Creating objects:
ClassName obj = new ClassName() - Default constructor – auto-provided by Java when no constructor is defined
- Parameterised constructor – initialising objects with values at creation time
thiskeyword – resolving naming conflicts between parameters and instance fields
static & final Members
staticvariable – one copy shared across all instances of a classstaticmethod – belongs to the class, not to any objectfinalvariable – constant; must be assigned exactly oncefinalmethod – cannot be overridden by a subclassfinalclass – cannot be extended (e.g.,Stringis a final class)
MODULE 09 – Synchronization & Wait Strategies
💡 Timing issues cause most automation failures. Proper synchronization makes your scripts reliable — even on slow networks or dynamic pages that load asynchronously.
Wait Types
Thread.sleep()– static wait (why it should be avoided in real scripts)driver.manage().timeouts().implicitlyWait()– global element search timeoutWebDriverWaitwithExpectedConditions– explicit conditional waits- Key conditions:
visibilityOfElementLocatedelementToBeClickabletextToBePresentInElementalertIsPresent
FluentWait– polling interval, custom timeout, ignoring exceptions- Choosing the right wait strategy for different application behaviours
MODULE 10 – Page Object Model (POM) Design Pattern
💡 POM is the industry-standard way to organise automation code. It separates locators from test logic — making scripts easier to maintain when the UI changes.
POM Architecture
- Why POM exists – separation of page logic from test logic
- Creating Page classes with locators and action methods
@FindByannotation – declaring locators declarativelyPageFactory.initElements(driver, this)– initialising page elements- Structuring a multi-page project: LoginPage, HomePage, CartPage, etc.
Common Issues & Fixes
- Understanding and handling
StaleElementReferenceException - Lazy initialisation vs eager initialisation of page elements
- Reusing page objects across multiple test classes
MODULE 11 – TestNG Framework & Assertions
💡 TestNG is the test management backbone of most Selenium projects. It controls the order, grouping, and reporting of your tests — making your suite production-quality.
TestNG Annotations & Configuration
- Core annotations:
@Test,@BeforeMethod,@AfterMethod,@BeforeClass,@AfterClass,@BeforeSuite,@AfterSuite - Test grouping with
groupsattribute – running smoke vs regression sets - Parameterisation using
@Parametersandtestng.xmlconfiguration - Data-driven testing using
@DataProvider - Parallel test execution – configuring thread count in
testng.xml - Test priority, dependency (
dependsOnMethods), and enabled flag - Custom logging using
Reporter.log()inside test methods
Assertions
- Hard assertions with
Assert– test stops immediately on failure - Soft assertions with
SoftAssert– collect all failures, report at end - Common assertion methods:
assertEquals,assertTrue,assertFalse,assertNull,assertNotNull - Choosing between hard and soft assertions based on test scenario
MODULE 12 – Data-Driven Testing with Apache POI
💡 Data-driven testing lets one script run across hundreds of input combinations stored in an Excel sheet — a standard practice in enterprise QA teams.
Apache POI – Excel Integration
- Adding Apache POI dependency to
pom.xmlfor.xlsxsupport XSSFWorkbook,XSSFSheet,XSSFRow,XSSFCell– reading the Excel object hierarchy- Reading test data row-by-row from an Excel file into test scripts
- Handling different cell types: String, Numeric, Boolean, Formula
- Writing test results (Pass/Fail) back into the Excel sheet
- Building a reusable
ExcelUtilsutility class for the framework
MODULE 13 – Automation Framework, Selenium Grid & Jenkins CI/CD
💡 This module brings everything together into a production-level framework — the kind you will actually work with inside a software company.
Framework Design (AFW)
- Recommended folder structure:
src/mainfor utilities,src/testfor test scripts - Building a
BaseTestclass – centralised driver initialisation and teardown - Integrating POM page classes, Excel utilities, and TestNG configuration
- Maven Surefire Plugin – triggering test suites from command line
- Version control with GitHub – pushing the project, branching basics
Selenium Grid & Cross-Browser Testing
- Selenium Grid architecture – Hub and Node setup for distributed execution
RemoteWebDriver– running tests on remote machines and browsers- Cloud-based grid execution using SauceLabs
- Configuring browser capabilities for parallel cross-browser runs
Jenkins CI/CD Integration
- Installing and configuring Jenkins for a Java/Maven project
- Creating a Jenkins job linked to a GitHub repository
- Scheduling automated test runs using cron-style build triggers
- Viewing TestNG reports and build history inside Jenkins dashboard
Live Projects You Will Build
Flight Booking API
Microservices based airline reservation backend.
E-Commerce Platform
Full-featured Amazon clone with Cart & Payment Gateway.
Smart Banking System
Secure transaction portal with Spring Security & JWT.
Hospital Management
Patient records & doctor booking system.
Why Choose This Course?
Work on Live Industry Projects
Work on real-time projects used in companies
Start Freelancing with Real Clients
Start earning through freelancing platforms
Build Job-Ready Portfolio
Create portfolio to showcase your skills
100% Placement Assistance
Resume + mock interviews + job referrals
FAQs
What is Selenium Automation Testing?
Selenium is a popular automation testing tool used to automate web application testing.
What will I learn in Selenium training?
You will learn Selenium WebDriver, Java, TestNG, frameworks, and automation projects.
Is Selenium in demand in the job market?
Yes, Selenium Automation Testing is highly in demand for QA and automation roles.
Do I need coding knowledge for Selenium?
Basic programming knowledge is helpful, but training starts from fundamentals.
Will I work on automation projects?
Yes, the course includes real-time automation testing projects.
