Skip to main content

Java Centre

If you are new to programming or have least experience with programming then I would recommend you to watch following java training videos first before embarking on learning Selenium.
If you are well versed with java programming language then you can directly move to selenium webdriver training videos
Following java training videos are tailored for selenium but they can also be used to learn java (or at least core java in general). The Java projects used in the video tutorials are available on GitHub at javatutorial and on seleniumtests_with_java.

Please don't use these programs to write selenium tests as selenium tests require a robust framework. Once you are skilled at java then may like to try Selenium Tests Automation Framework to write your selenium tests in java.

So bookmark this page to keep track of new videos :-)

So here we go -

Training Video Content

Training Videos

Introduction to java technology

Downloading community version of IDEA

Installing Java

Running your first java program

Beginning with Java

Introduction to Object

Introduction to Class

Inroduction to Inheritance

Introduction to Package

Introduction to selenium API

OOPS and Java

Introduction to Variables

Introduction to Arrays

Control flow statements in java

Java Language Basics

Access specifiers 

Defining methods - instance and class methods

Overloaded methods

Passing variable argument to method

Return value from method

Using this keyword

Static initializer

Java Classes, objects and method

Enum Type - 

   With and without parameter

   Creating Enum in Intellij

Iterating through values of enum

Instance Initialization

Switch Statement 

Enum and switch statement

Interface in java

implementing an interface

Overriding method in interface

Using interface type

Down casting

Selenium examples

Interface and Java


  Raw Type 

Generic Type 


Exception Hierarchy - 

Types of exceptions -

Checked Exception 

Unchecked Exception -




Handling Exception with try - catch - finally block

Specifying the exception

Exception classes in WebDriver

Generics and Exception

The core collection interfaces.

List, Set, Map 

Important collection methods 

Introduction to ArrayList -

Introduction to HashSet -

Introduction to HashMap -

Traversing collection using for each loop and Iterator Object

Introducing java collection framework

Using collection framework with webdriver - 

Array List example 

Set Example

HashMap example

Java Collection framework and Selenium Webdriver

Date and time operations -  

generate time in ms 

calculate time difference between two operations 

creating date instance using java.util.Date 

compare dates, which date is ahead? 

accessing year, month day etc for a given calendar 

generating future/past dates 

formatting date 

a complex example - generating future date for USA time zone

Date and Time operations

File System -  

      retrieving absolute file path

copy file to another file

read txt file

read property file

parsing xml file

Handling files in java

Database operations with java (JDBC) -   

establishing connection   
executing select query
executing update query


Dealing with multiple form objects

  • Form with many fields
  • How to not write bloated data objects
  • Builder pattern comes for rescue


IDEA hacks

This session covers -
  • Refactor - > Encapsulate fields
  • Refactor - rename
  • Code generation - > Generate getter, setters, toString, equals etc. Ex
  • Conditional Debug points
  • Cmd + shift +a to search anything
  • Analyze stacktrace


Intro to java 8 and selenium using java 8

This session covers -
  • Why is java 8 so popular?
  • I do not java yet : -/
  • What is FunctionalInterface?
  • Functional programming and Lambda
  • Interface having method with no argument
  • Interface having method with one argument
  • What if AnimalHavingMethodArgument has two abstract methods?
  • And what next? > Future training videos sneak peak using java 8 and selenium?


Java 8 part 2: Stream filter operations and Selenium WebDriver

This session covers -
  • List operations in java 8
    • Using stream with List
    • Filter stream
    • FindFirst
  • Intro to method references
  • Intermediate operations (i.e. filter, map)
  • Terminal operation (forEach, findFirst, reduce, collect)
  • WebDriver and list examples using java 8

java-8-part-2-Stream filter operations and Selenium WebDriver

Java 8 part 3: Stream map operations and Selenium WebDriver

This session covers -
  • Some more gran on lambda
  • Intro. to Stream > map api (Forget about Map api for now :))
  • How lambda returns a value?
  • Using predicate static variable and method references
  • WebDriver and map examples using java 8
  • Debugging map operation on data point


Java 8 part 4: Optional and Selenium WebDriver

This session covers -
  • Java 8 part 4: Optional and Selenium WebDriver (yes learning Optional is not optional :))
  • Why Optional > What happen when data is null
  • Optional > an object which may or may not contain non null values (some prefer to call it empty value)
  • Do you remember where we used Optional?  :) com.seleniumtests.java8.ListExamples class > findFirst()
  • Creating Optional using - of, ofNullable, orElse  
  • WebDriver examples with Optional >    
    • Default locale
    • Testing with different data sets i.e. lower and upper case


Java 8 part 5: IntStream, sum, avg, reduce, file reading operations and SeleniumWebDriver

This session covers -
  • Method implementation on interface with java 8 - static and default methods, wtf??
  • IntStream.range()
  • More Stream operations -    
    • sum, sort, average
    • And how do I add double numbers?
  • Reading from file
  • Collectors.toMap 
  • Where are the WebDriver examples??


Java 8 part 6: Stream cont. and Selenium WebDriver

This session covers -
  • Different ways of creating Stream
    • empty stream, stream of collection, stream of string objects, stream builder, stream generate method with limit and iterate
  • Stream of primitives
    • int, long and double streams using IntStream, LongStream, DoubleStream interfaces
  • Stream of File
  • Streams can not be reused
  • How to eliminate expensive operations
  • And what is parallel stream?? 
  • And some WebDriver examples


Java 8 part 7: Back to basics and Selenium WebDriver

This session covers -

  • PECS > Producer extends Consumer super
  • Remember Generics which provide type safety?:
  • What are “extends”, “super” and bounded wild card?
  • <? extends T> and <? super T> WTF ??? 
  • map(Function<? super T, ? extends R> mapper) example from com.seleniumtests.tests.web.SeleniumWithJava8Session6#usingJava8
    • forEach(Consumer<? super T> action)
    • PECS on Jav8 > Stream examples -


IDEA Hack 2

This session covers -

  • Presentation assistant plugin
  • Double shift > search any where 
  • Search class name using first letters    
    • Go to specific line on file i.e. filename:linenumber
    • Searching folders i.e. /resources
  • Recent files > cmd+E
  • Project pane > cmd+1
  • Creating new file/package etc > cmd/ctrl + N
  • Auto scroll from source
  • Move one or multiple lines without cut and paste
    • select + option + shift + arrow up/down
  • Turn off presentation assistant plugin


REST API Testing

This session covers -

  • REST Assured Maven dependency, 
REST Assured Includes JsonPath and XmlPath  to parse json and xml documents respectively

  • API used in testing: 
Passing parameters between tests using extract method

  • Set base URI
  • With and without Gherkins syntax
  • Data driven test with query, path parameters and Curly bracket notation
  • Operations around Get


Popular posts from this blog

Distributed Load Testing with JMeter

Distributed Testing with JMeter When one JMeter client is not able to offer amount of threads required for load testing then distributed testing is used. In distributed testing - One instance of JMeter client can control number of JMeter instances and collect data from them Test plan does not need to be copied to each server, the client sends it to all servers note - JMeter will run all the threads on all the servers, hence 100 threads on 5 JMeter server would pump 500 threads in total. If many server instances are used, the client JMeter can become overloaded and so the client network connection. This has been improved in latest versions of JMeter by switching to Stripped modes, but you should always check that your client is not overloaded When Client (master) and Server (slave) nodes are on same network (no SSH required) Configure Client Node Herein client is referred as the machine controlling test execution on other JMeter nodes. This is also referred

Appium and android mobile app automation

Next appium and Android mobile app automation video tutoria l is live. If you are new to appium then please check - appium-tutorial This video tutorial covers - Start vysor (Just for this session and not mobile automation :)) Start appium and start appium inspector Desired Capabilities platformName - Android deviceName - L2N0219828001013 (as seen on "adb devices") Saved Capability Sets Start Session Scan app elements using appium inspector Get appPackage and appActivity using "APK info" app Install "APK info" app and open app whose appPackage and appActivity are required i.e. calculator Check top section of app icon is app package is app activity testng.xml file settings for running Android app tests Test details and CalculatorScreen class View beautiful STF test report  

Verify email confirmation using Selenium

Note: If you are new to java and selenium then start with selenium java training videos .     Email confirmation seems to be integral part of any registration process. I came across an application which lets you provide your email address. You can follow the sign up link in you mail and then complete the registration process. Lets consider we provide GMail address for it. Now if were to use only Selenium then we would have to follow following steps - Launch GMail using Selenium; Some how search for new mail in the list of available mails; Some how click on it; Parse the mail message; Get the registration link; Follow up with registration process What do you think of an approach in which you can