Selenium WebDriver C# .NET
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.
We also have a course on SpecFlow, if you are interested in integrating Selenium into a BDD framework.
This course covers all the essential principles of using the Selenium WebDriver automation framework in Microsoft Visual Studio. Designed for beginners as well as testers with previous automation experience. Course objectives include:
- understand the key principles of test automation using Selenium WebDriver
- understand how to structure your automated testing including the Page Object Model
- gain a full understanding of how Selenium integrates with the Application Under Test
- Understand how to integrate with other tools such as Git & Jenkins/Azure DevOps
- Visual Development Studio, Selenium WebDriver C# binding, NUnit, Git, Jenkins or Azure DevOps
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.
Introduction to WebDriver
An overview of the Selenium tools family, Unit testing Frameworks, and Supported Browsers.
Installation & Setup
Libraries & Extensions in VS, using NuGet to install the required libraries. How to organise your file structure.
First Test Case
Creating our initial NUnit Test, the import statements, invoking a browser, writing to the console, writing a simple script against the Web Site
Element locator strategies, Chrome Developer Tools and other extensions, Regular Expressions, Index, Xpath functions
Recording & Exporting Scripts
What is Synchronisation, Adding Delay, Implicit versus Explicit Waits, common examples
Capturing Values and Validation
How to capture values from the Web Site, Using Asserts, Execution Flow, Debugging Tools
How to build more than one test, in a single Class, NUnit Fixtures, Execution Order, NUnit Traits/Categories, Playlists
Creating a Test Base Class to use through Inheritance for SetUp & TearDown
Reusable code, Common examples such as Handling Alerts & Pop-ups
Console reporting, Taking Screenshots, Creating Dynamic HTML Results with Extent Reports
Handling differences between Browsers, Tips for Edge & IE Browsers
Data driving your Tests using In-Line Test Data, using external sources such as CSV files
Introducing Page Objects (POM)
Refactoring our tests to use a page object model. Developing a library of pages (POMs). Fluent Coding.
Using Application config files to store global values
Command Line Execution
Command-line execution with the NUnit Console Runner
Integrating with Git & GitHub
Integrating with Jenkins or Azure DevOps for C.I.