Selenium with JAVA Programming: We can design selenium scripts by using java programming language. In Java we are using some of below concepts. Basic of Core Java –Data Types, Conditional statements, Control statement, Access modifiers, Types of Variables and Static Vs Not Static. Oops –

Inheritance –Reusing the existing code instead of creating duplicate code for same functionality.

Polymorphism - Creating same method with different set of parameters to get different behaviour to each method.

Encapsulation- Binding a Data

Abstraction- it is a key word to define to Method and Classes .If any class has abstract method then that class type must be Abstract. We can create object to abstract classes. This class can contains both abstract methods and non-abstract methods

Super –It is a key word used to call the super class variables and methods.

This –It is Key word used to call current class variables and methods.

Final –It is a key word used to define variables, Methods and Classes.

If any Variables define as final those variables values nave possible to modify, for any method define has Final then those methods will never allow to override methods and if that class type mention has final then those class will never ever allow to inherited.

String – It is a data type and also pre-defined class, which contains pre-defined methods to manipulate string by using methods like Length() , Substring , Concatenation , Index Of , CharAt , split , format ,etc.

String Buffer-It is a class to create mutable Strings objects. It follows synchronised concept

String Builder – It is a class to create mutable Strings objects. It follows non synchronised concept

Exception Handling: Exception Handling is mechanism to avoid the abnormal termination of java code execution and providing alternative way using try, Catch and Finally.

There are two different categories of exception

1. Checked Exceptions

2. Un Checked Exceptions

Arrays: Array is to store one or more element as one entity which are same type. The size of the array is fixed there is no possibility to increase or decrease the size based on the requirement.

Arrays does not follow any standard data structure so we can expect readymade method to used instead of create our own code for each functionality.

Collection: Collection is to store one or more element which are same or different types of data. Collection is grow able in nature hence we can increase or decrease based on requirement

Collection interface implemented based on some standard data stricture hence we can expect readymade methods support, being a programmer we can use those methods instead of creating method our own.

File IO: In this File IO we have package Java.Util.*. It contains some pre-defined classes and methods used for reading file, writing file and compare files.

We can also read files like .Properties file and txt file

To read excel file we need to work third party library like Apache POI or JXL.

Apache POI: is a library used to read, write and copy the excel file. This library provides some pre-defined class like XSSFWorkbook, XSSFShite, and XSSFRow Oops –Inheritance –Reusing the existing code instead of creating duplicate code for same functionality.Polymorphism - Creating same method with different set of parameters to get different behaviour to each method.Encapsulation- Binding a DataAbstraction- it is a key word to define to Method and Classes .If any class has abstract method then that class type must be Abstract. We can create object to abstract classes. This class can contains both abstract methods and non-abstract methodsSuper –It is a key word used to call the super class variables and methods.This –It is Key word used to call current class variables and methods.Final –It is a key word used to define variables, Methods and Classes.If any Variables define as final those variables values nave possible to modify, for any method define has Final then those methods will never allow to override methods and if that class type mention has final then those class will never ever allow to inherited.String – It is a data type and also pre-defined class, which contains pre-defined methods to manipulate string by using methods like Length() , Substring , Concatenation , Index Of , CharAt , split , format ,etc.String Buffer-It is a class to create mutable Strings objects. It follows synchronised conceptString Builder – It is a class to create mutable Strings objects. It follows non synchronised conceptException Handling: Exception Handling is mechanism to avoid the abnormal termination of java code execution and providing alternative way using try, Catch and Finally.There are two different categories of exception1. Checked Exceptions2. Un Checked ExceptionsArrays: Array is to store one or more element as one entity which are same type. The size of the array is fixed there is no possibility to increase or decrease the size based on the requirement.Arrays does not follow any standard data structure so we can expect readymade method to used instead of create our own code for each functionality.Collection: Collection is to store one or more element which are same or different types of data. Collection is grow able in nature hence we can increase or decrease based on requirementCollection interface implemented based on some standard data stricture hence we can expect readymade methods support, being a programmer we can use those methods instead of creating method our own.File IO: In this File IO we have package Java.Util.*. It contains some pre-defined classes and methods used for reading file, writing file and compare files.We can also read files like .Properties file and txt fileTo read excel file we need to work third party library like Apache POI or JXL.Apache POI: is a library used to read, write and copy the excel file. This library provides some pre-defined class like XSSFWorkbook, XSSFShite, and XSSFRow

Selenium:

Selenium supports only Web Application Automation but some web application may need to communicate with window to upload file, download File, Etc.

Any application when we are automating there are scenarios which may need communicate local drives to access file from our machine to upload. This cases we will depends on ROBOT class or AUTOIT to handle this type of scenarios.

Example: In Naukri web application when we clicks on browser button to upload resume then application will point to local drives to pick the file. Since selenium support web application automation so will use robot class or Auto IT to automate this kind of scenarios.

Locators: This locators are used identify the element by using following locators like:

ID, NAME, CLASSNAME, TAGNAME, XPATH, CSSSELECTOR, LINKTEXT, PARTIAL LINK TEXT, etc.

All the Above locators are available under BY class as static methods.

Web Element- Everything in selenium will consider as Web Element, it is an interface used to store Web elements for reference.

Actions- it is a class contains predefined methods used to perform the mouse Actions.

Ex: 1. Double Click (Double Click)

2. Right Click (Context Click)

3. Mouse over (Move to Element)

4. Drag and Drop (Drag and Drop)

Alert: Is an interface used to handle to alert using Accept (), Dismiss (), SendKeys (), GetText ().

Frames: In application we may have one more frames. If the cursor not present in current frame then we need to switch between frames.

Web Tables: We can read data from page which is table form by using tag name TR and TD

TestNG: It is framework worked based on annotations like @Test , @enabled , @AlwaysRun ,@Groups , @DependsOnMethod,Etc.

This TestNG Library provides by default HTML reporting.

Data Driven Framework: It is framework followed certain guidelines and structure to driven application execution using test data present in excel or any other source files.

POM: means Page Object Model is another framework followed to create object to repository for each page to access web element. This framework recommended to use if the application has more pages.

JDBC: Here we are connecting to data base to retrieve the expected result to compare with actual result.

Maven: It is a build tool to use to build the code with maven dependencies.

GitHub: It is used to store the source code for reference

Jenkins: It is used for continues integration to trigger build on schedule date and time. And also to attach test results into email with build no,etc.