Selenium WebDriver JavaScript

The web testing standard

Selenium WebDriver has become the standard tool for automated web testing. It has received an endorsement from W3C (World Wide Web Consortium), the community which works on web standards development and Selenium 4 is W3C compliant. It is open-source and provides a powerful set of tools for testing your web site. It is available on any platform and can be used with just about any web browser, including remote execution via Selenium Grid.

You can also integrate it into a huge variety of frameworks such as Cucumber, SpecFlow, Mocha etc, as well as testing frameworks such as NUnit, xUnit, JUnit, MSTest etc., and use your choice of assertion libraries. It also integrates very easily into Continuous Integration Tools such as Jenkins, Azure DevOps, TeamCity etc.

Our Course

Selenium Logo

Our Selenium JavaScript course is very comprehensive, and covers all you need to know about Selenium WebDriver JavaScript. It includes in-depth topics on locators (critical to reliable tests), Page Object Models, integration into CI tools. It also covers topics on Selenium Grid/Server and Selenium IDE.

Technologies Used

  • Microsoft Visual Studio Code, Mocha, Chai, NodeJS & npm, WebDriverJS

Delivery

The course can be taken online or on-site at your offices. For the online training, it is live, instructor-led and we use GoToTraining for our virtual classroom environment. All delegates receive a very comprehensive workbook.

The online course is over 5 days, with each day being approximately 3.5 hours of online training. For classroom training it is a 3 full day course.

Course Overview

Course Overview

Introduction to JavaScript

An overview of the History & Terms, Basic Syntax, Browser Dev Tools & the Console

JavaScript in the IDE

IDEs, VS Code, Node & Npm, Setting up the workspace, executing JS, VS Code features.

First Test Case – WebDriverJS

What is Selenium? Selenium Projects, installing WebDriverJS and Browser drivers, creating our first script

Object Identification

Element locator strategies, Chrome Developer Tools and other extensions, Regular Expressions, Index, Xpath functions

Simple WebDriver Tests

Creating a simple test, execution & failures, debugging tools

Synchronisation

JavaScript Asynchronous nature, Callbacks, Promises, Async/Await, Adding Delay, Implicit versus Explicit Waits, common examples

Asserts

Node Asserts, Chai Asserts, Chai Styles, installing and using Chai

Mocha

What is Mocha? Why use Mocha, Installation, using Mocha, Mocha Options, Hooks, Mocha Timeouts, Execution options

Reporting

Mocha –report option, installing and using Mochawesome, writing to the results

Helper Libraries

Reusable code, writing, exporting & importing methods from modules, Common examples

Introducing Page Objects (POM)

Introduction to why we do it and how it reduces maintenance. Refactoring our tests to use a page object model. Developing a library of pages (POMs)

Handling Web Elements

Handling Web Tables, Drop-Down lists, executing JavaScript in the Browser, Keyboard input & more

Source Control

Integrating VS Code with Git & GitHub, adding our project to Source Control

Continuous Integration

Command-line execution, integration with Jenkins