Selenium – Basics of Java Part 3

Working with Classes, Objects and Methods

Declaring Classes – You have seen classes defined in the following way:

Class MyClass {

// field, constructor, and

// method declarations

}

This is a class declaration. The class body contains all the code that provide for the lifecycle of the objects created from the class.

In general, class declarations can include these components, in order: Read More

Selenium – Basics of Java Part 2

Language and Syntax Basics

Variables

The Java programming language is statically-typed, which means that all variables must first declared before they can be used.

Example – int gear=1;

Data Type Default Value
Byte 0
Short 0
Int 0
Long 0L
Float 0.0f
Double 0.0d
Char \u0000′
String Null
Boolean FALSE

The Java programming language defines the following kinds of variable: Read More

Selenium – Basics of Java Part 1

We will focusing on Java as a programming language in selenium WebDriver we need to be comfortable with the basics of Java. This topic we will discuss about basic concepts around Java language, Syntax for basic Java statements, exception handling and concept of classes and objects.

Key Objectives:

  • Object oriented programming concepts
  • Language and syntax basics
  • Object, classes and method
  • Exception Handling

Read More