Selenium Using Java

  • /
  • Courses

Duration

25 Hours

Course Price

$ 399.00

4.5 (23)

Overview

Course Content

 

1) Automation

  • Benefits of Automation Testing
  • Various Tools Available in Market
  • Comparison between the tool

2) Automation Approaches

  • Tool Based
  • Framework Based
  • Record & Play
  • Modularization

3) Basics Of Java

  • Java Introduction
  • DataTypes
  • Looping Concepts
  • Conditional Statement
  • Concatenation Operator
  • Local & Global Variable
  • Static Variable
  • Object
  • Static & Non Static Concepts
  • Object Reference
  • Pass by Value
  • Pass by Reference
  • Constructor
  • Overloading
  • This Keyword
  • What is Class?
  • Polymorphism
  • Inheritance
  • Overriding
  • Final Class
  • Final Variable
  • Final Method
  • Interface
  • Abstraction
  • Encapsulation
  • ArrayList
  • HashTable
  • Collections
  • Convert DataTypes
  • String To Integer
  • Integer to String

4) IDE – Integrated Development Environment

  • Record & Play

  • Inserting Commands

  • Verification & Assertion

  • Hand On Exercise using Java Script

5) Testing using TestNG

  • Configure TestNG Project

  • TestNGAnnotations

  • Parameterization in TestNG

  • Run Test in Batch

6) Selenium WebDriver

  • Command to Openurl in FireFox, Chrome, Internet Explorer

  • XPath

  • CSS Selector

  • Get All List from page

  • Implicit Wait

  • Explicit Wait

  • Window Handle

7) Read/Write Data

  • Read/ Write data in Text File
  • Read/Write data in Excel
  • Read Data from Property File

8) Automation Framework - Types

  • Types Of Framework
  • Linear Framework
  • Data Driver Framework
  • Keyword Driven
  • Hybrid Framework

9) Automation Framework- Advanced Hands On

  • Hybrid Framework using Page Object Model

10) Automation Scripts Creation –Live Project

  • Using Hybrid Framework

Trainer Profile

Manish Jaiswal: 
 
Over 9+ years experience in Software and Automation testing
  • Created different framework in Selenium
  • Conducted trainings at different places in Noida & Delhi on topics Software Testing
  • Automation Testing using QTP/UFT
  • Advanced Scripting using Selenium
  • Conducted trainings in NIIT for Selenium
  • Conducted many Trainings in institute say: SEED InfoTech, Noida and Delhi
  • Conducted trainings for both Manual & Automation Testing
  • Conducted online trainings on above given topics at both Fiserv India & NIIT
  • Designed Automation Testing framework architecture using VB Script in UFT/QTP
  • Experience in all phases of Software Development Life Cycle (Requirements Analysis, Design Testing, Implementation and Support) to perform QA activities
  • Experience in Functional Testing, Database Testing using SQL queries, Regression Testing, GUI testing
  • Knowledge of SQL (SQL Server 2008) to validate Transaction Testing for front end testing to validate data in back end database
  • Attended daily scrum meeting with onsite team members
  • Created different Automation Utilities that helps to improve the productivity & saves time drastically. These utilities reduces manual efforts an average by 30% (8 hours job can be done in  around 2.5 hours). Manager & team have appreciated my efforts for this creation

Interview Questions & Answer

1) What is test automation or automation testing?

Automation testing uses automation tools to write and execute test cases, no manual involvement is required for executing an automated test suite. Testers prefer automation tools to write test scripts and test cases and after that group into test suites.

Automation testing authorize the use of specialized tools to automate the execution of manually designed test cases without any human intervention. Automation testing tools can access the test data, controls the execution of tests and it also compares the actual result against the expected result. As a result, it generates detailed test reports of the system under test.

2) What is Selenium and What are the different components of Selenium?

Selenium is a portable framework for software testing. It is an open source testing suite to test web       applications. This tool facilitates with a playback tool in order to authoring functional test. It is one of the most commonly used open source web ui automation testing tool.  Selenium also supports automation across different browsers, platforms, and programming languages.

Selenium is not just a single tool but a suite of software's. And each have a different approach to support automation testing. It consist of four major components:

  1. Selenium Integrated Development Environment (IDE)

  2. Selenium Remote Control (Now Deprecated)

  3. WebDriver

  4. Selenium Grid

3) What are the programming languages, browsers and operating systems that are supported by Selenium.

 Selenium supports the following operating systems, browsers and programming languages:

  • Programming Languages: C#, Java, Python, PHP, Ruby, Perl, JavaScript.

  • Operating Systems: Android, iOS, Windows, Linux, Mac, Solaris.

  • Browsers: Google Chrome, Mozilla Firefox, Internet Explorer, Edge, Opera, Safari, etc

 4) List some of the test types that are supported by Selenium.

 The various tests that are supported by Selenium are:

  • Functional Testing

  • Regression Testing

  • Sanity Testing

  • Smoke Testing

  • Responsive Testing

  • Cross Browser Testing

  • UI testing (black box)

  • Integration Testing

5 ) What is Selenium IDE?

Selenium  IDE ( integrated Develoment Environment) is a firefox plugin. It is the latest upgrade in selenium version and it is the simplest framework in the Selenium suite.. It  is implemented as Firefox extension. It allows us to record and playback the scripts. It allows testers to export recorded scripts in many languages like HTML, Java, Ruby, RSpec, Python, C#, JUnit and TestNG.

Selenium  IDE has limited scope, and the generated test scripts are not very robust, and portable.

6) What are some of the Automation tools which could be integrated with Selenium to achieve continuous testing.

Selenium is used to automate functional tests and can be integrated with automation test tools such as Maven, Jenkins, &Docker to achieve continuous testing. It can also be integrated with tools such as TestNG, &JUnit for managing test cases and generating reports.

7) What do you mean by XPath?

XPath is also called as XML Path. It is a language used to query XML documents. It is used to locate elements in selenium. XPath consists of a path expression along with some conditions. Here, we can easily write XPath script/query to locate any element in the webpage. It is developed to allow the navigation of XML documents. The key factors that it considered while navigating are selecting individual elements, attributes, or some other part of an XML document for specific processing. It also produces reliable locators. Some other important points about XPath are as follows.

  • XPath is a language used for locating nodes in XML documents.

  • XPath can be used as a substitute when you don't have a suitable id or name attribute for the element you want to locate.

  • XPath provides locating strategies like:

  • XPath Absolute

  • XPath Attribute

8) What is a Framework?

A framework is a set of rules or best practices which we can follow in a systematic wayin order to achieve the desired results. The different types of automation frameworks are:

9)What is Selenium WebDriver?

Selenium WebDriver AKA Selenium 2 is a browser automation framework. It accepts commands and sends them to a browser. it is used to distribute the test execution on various platforms and environment simultaneously. It is implemented through a browser-specific driver. It controls the browser by directly communicating with it.

Selenium WebDriver supports Java, C#, PHP, Python, Perl, Ruby.

10)  How do I launch the web browser using WebDriver?

The following syntax can be used to launch the browser corresponding to the system’s operating system:

WebDriver driver = new FirefoxDriver();

Or

WebDriver driver = new InternetExplorerDriver();

Or

WebDriver driver = new ChromeDriver();

11) What is Page Object Model in Selenium?

Page Object Model is a Design Pattern. It has become popular in Selenium Test Automation. It is widely used design pattern in Selenium for enhancing test maintenance and reducing code duplication. Page object model (POM) is used in any kind of framework like modular, data-driven, keyword driven, hybrid framework etc. 

A page object is an object-oriented class which serves as an interface to a page of your Application Under Test(AUT). The tests then use the methods of this page object class when they need to interact with the User Interface (UI) of that page. The benefit is that if the UI changes for the page, the tests themselves don’t need to change, only the code within the page object needs to change. Subsequently, all changes to support that new UI is located in one place.

12) What are the advantages of Page Object Model Framework?

Code reusability – We could achieve code reusability by writing the code once and we can use it in different tests.

Code maintainability – There is a clean separation between test code and page specific code such as locators and layout which becomes very easy to maintain code. It enhances test maintenance and reduces code duplication.

Object Repository – Each page will be defined as a java class. All the fields in the page will be defined in an interface as members. The class will then implement the interface.

Readability – Improves readability due to clean separation between test code and page specific code.

13) Why do testers choose Selenium over QTP?

 Selenium is  widely used than QTP because:

  • Selenium is an open-source tool, whereas QTP is a profitable tool.

  • Selenium is used specifically for testing web-based applications, while QTP can be used for testing client–server applications too

  • Selenium supports multiple browsers like Firefox, IE, Opera, Safari, etc. and has multiple operating systems compatibility too. Selenium-supported OS platforms are Windows, Mac, Linux, etc. On the other hand, QTP is limited to Internet Explorer on Windows

  • Selenium supports multi-programming language compatibility. Languages supported by Selenium are Python, Ruby, Perl, etc. whereas QTP supports only VBScript.

14) What are the four elements that you have to pass in Selenium?

Four parameters that need to be passed in Selenium are:

  • Host

  • Port number

  • Browser

  • URL

16)Describe the difference between Selenium and QTP.

Feature

Selenium

Quick Test Professional (QTP)

Browser compatibility

It supports almost all popular browsers: Firefox, Chrome, Safari, Internet Explorer, Opera, etc.

QTP supports Internet Explorer, Firefox, and Chrome. It only supports Windows operating system

Distribution

It is distributed as an open-source tool and is freely available

It is distributed as a licensed tool and is commercialized

Application under test (AUT)

It supports the testing of web-based applications only

It supports the testing of both web-based and Windows-based applications

Object repository

Object repository needs to be created as a separate entity in Selenium

QTP automatically creates and maintains the object repository

Language support

It supports multiple programming languages like Java, C#, Ruby, Python, Perl, etc.

It supports only VBScript

Vendor support

As Selenium is a free tool, users would not get the vendor’s support in troubleshooting issues

Users can  get the vendor’s support if they face any issues.

 

 

Blog

 

Demand for testing is huge. Market tool is now more competitive than ever. But so far, no one has outshone Selenium in terms of popularity and adoption. The most important benefit of Selenium is the fact that it is open source. In other words, it is completely free to download and use. Selenium provides an API called WebDriver which enables testers to craft their tests in many programming languages, including Java, C#, Python, etc. Besides web browsers, you can also automate mobile devices like Android, and iOS via Appium.

 

How to build a selenium framework.

 

  1. Choose a programming language

  2. Choose a unit test framework

  3. Design the framework architecture

  4. Build the selenium core component

  5. Build the selenium test component

  6. Choose a reporting mechanism

  7. Decide how to implement CI/CD

  8. Integrate your framework with other tools

 

Selenium is a powerful tool to perform functional and regression testing.  To get the most benefit out of it, we should have a good framework architecture right from the start.

 

Register For Online Demo


Can't read the image? click here to refresh