
Develop modern automation frameworks with Selenium and C#, building robust page object models, dependency injection, and SpecFlow, xUnit, AutoFixture practices in dotnet seven.
Explore the basics of a test automation framework built with selenium in c sharp dotnet, including reusable, maintainable, scalable components and guidelines for consistent, efficient automated testing.
Explore test automation frameworks, including data driven, keyword driven, hybrid, and modular, where test data sits separate from scripts and feeds tests from JSON, XML, Excel, and database tables.
Identify the core components of a test automation framework, including scripts, libraries, configurations, utilities, data, and reporting. Explore parallel execution, CI/CD, version control, and integration with the application under test.
Explore essential coding patterns for test automation, including page object model, factory, dependency injection, and dispose patterns, to design a robust selenium c# .net framework.
Learn the foundational concepts of selenium with C# .NET, including cross-platform execution with drivers, browser support, and common syntax differences from Java, plus early page object model notes.
Install Visual Studio 2022 community edition and dotnet eight, then create an NUnit test project in C# and add Selenium WebDriver via NuGet to begin automated testing.
Write your first Selenium C# test using the WebDriver in Visual Studio. Navigate to google.com, maximize the window, locate an element, and send keys.
Learn to drive Chrome with Selenium in C#, navigate URLs, manage windows, and locate elements with the By class. Explore API docs and WebDriver interfaces for deeper comprehension.
Identify and locate web user interface elements using selenium locator types such as id, name, class, css selector, link text, and xpath, then perform actions like click and send keys.
Identify and interact with UI elements using selenium's find element with id, name, and css selectors, then perform click and send keys to drive login workflows.
Explore how to work with drop down and multi-select controls in Selenium using C#. Learn to locate, select by value or text, handle multi-select options, and retrieve all selected options.
Learn to run the ASP.NET Core Web API and its Web UI with Rider or Visual Studio 2022, start multiple startup projects, and verify endpoints for automated testing.
Learn to build the actual automation framework structure for selenium in c sharp dotnet, switch from NUnit to XUnit, and create a new framework project for e test automation.
Learn to run the application under test from Visual Studio 2022 or the command line on Windows and macOS, using multiple startup projects like the web app and product API.
Learn to write the first XUnit tests for an application under test using Selenium WebDriver in C# .NET, including setup via a constructor, managing the ChromeDriver, and proper disposal.
Learn the dispose pattern and IDisposable in C# to release unmanaged resources like IWebDriver after test execution by using quit or dispose with null checks.
Learn to manage multiple browser types from a single place by parameterizing the driver, returning the correct Chrome, Firefox, or Edge driver with a safe default via a switch expression.
Implement strongly typed cross browser types by replacing string arguments with a browser type enum, enabling compile-time checks for chrome, firefox, edge chromium, and safari across tests.
Create a dedicated framework project as a class library, organize into config, driver, and extensions, and centralize WebDriver management by implementing a DriverFixture to initialize and expose IWebDriver for tests.
Create an object from the driver fixture, use the Selenium WebDriver, and add a project reference to the EE framework.
Configure test settings in a central config folder by creating a settings class that passes browser type, application URL, and timeout to the driver fixture, resolving constructor argument issues.
Pass test settings through a centralized test settings class to drive fixtures in xUnit tests, enabling browser selection and URL configuration.
Introduce future-proofing the framework by using an IDriverFixture interface and dependency injection to access the driver through its interface. Aligns with Selenium patterns and enables a page object model.
Learn to implement a page object model in Selenium with C# .NET by creating a home page object with locators and a product link click using a driver fixture.
Learn to implement a page object model for the product page in selenium using c# .net, including constructor setup, locators, form interactions, and creating a product.
Learn to extend the Selenium C# .NET framework with custom controls and .NET extension methods, including web element extensions for dropdowns by text, value, or index in page object model.
Extend the IWebElement type with extension methods to support select dropdown by text, index, or value, and demonstrate static class design, send keys, and HTML table extensions.
Switch from Visual Studio 2022 to Rider IDE for cross-platform dotnet development, highlighting JetBrains Writer IDE, macOS workflows, NuGet management, and running unit tests from the Rider environment.
Learn to automate web tables with an HTML table extension, reading headers and rows, indexing columns, and storing data for actions such as clicking or selecting dropdowns.
Create an HTML table extension to read a full web table into a collection, capturing columns, rows, and special controls, then perform actions by reference name and value.
Apply the HtmlTableExtension in selenium tests by locating the table with class table, selecting the target cell, and performing a details click via a generic perform action on cell.
Fuse the html table extension into the selenium c# .net code base, relocate the details page to the product page, and use perform click on special value to verify details.
Explore data driven testing in Selenium, presenting robust approaches to manage and pass test data within a framework and integrate data handling into test code.
Use xUnit theory with inline data for data-driven testing to avoid hard-coded duplicates, while preparing for scalable handling of many product fields and upcoming random value generation.
Replace inline data with a concrete product model aligned with the product api. Use a strongly typed product object with a product type enum, plus auto fixture.
Learn to enable dynamic test data with AutoFixture and AutoFixture.Xunit2 by installing the NuGet package, enabling auto data, and driving data-driven tests in Selenium.
Configure the framework to read external settings from an app settings JSON file using a config reader, loading browser type, URL, and timeout, and copy to output.
Create a config reader to load app settings JSON from the bin location, deserializing into test settings with case-insensitive properties and a browser type enum converter.
Read test data from a configuration file using the config reader. Wire the data into test settings and ensure the app settings JSON is copied to the bin directory.
Explore how to implement explicit waiting in Selenium with driver wait to handle missing or delayed ui elements, extending a framework to reliably wait for a specific element.
Build a driver wait class in a robust selenium c# .net framework, using interfaces, a driver fixture, and lazy initialization with WebDriverWait to synchronize with the DOM.
Implement a lazy wait mechanism within a page object model using a custom driver wait that returns IWebElement and find elements, via interfaces and dependency injection.
Explore dependency injection concepts by moving object creation out of tests into a container using interfaces, and register dependencies with an ASP.NET Core service container.
Learn to apply xunit dependency injection to tests by registering services in a startup configuration and replacing concrete types with interfaces for test settings and fixtures.
Refactor the test setup by injecting the driver through DI, replacing concrete class usage with an interface, and verify tests pass after registration in the startup class.
Extract interfaces from home and product pages to enable dependency injection in the page object model, register them as scoped services in startup, and streamline tests.
Apply separation of concerns and the single responsibility principle by keeping test logic focused on testing, while driver creation, page objects, and configuration live in dedicated framework components.
build a modern selenium c# .net automation framework by using file scope namespaces, centralized usings, and dependency injection, while improving separation of concerns and preparing for spec flow.
Automation framework development with Selenium C# is an advanced course designed to address End-to-End framework development with tools such as
The curriculum of this course is designed not just by randomly choosing some of the topics that I know, the course has evolved over a period (18+ years) by giving training to more than 299,000+ professionals (both online and corporate training) and working in automation testing field 18+ years now
Hence the course is a much refined version, meaning the course won't deviate from the topics it is meant to be.
The course includes all the source codes that we will discuss in the course, hence one must have all the source code required at the end of every section.
Finally, the course is for those, who are serious about automation testing framework development from the complete ground up.
In this course, you will learn to automate ASP NET Web API and WebUI projects using tools such as
Selenium 4.19
.NET 8
C# 12
XUnit
AutoFixture
Fluent Assertion
Specflow
We will also be using the following patterns in this course
Dependency Injection
Factory Pattern
Page Object Model Pattern
Lazy Initialization
At the end of this course, you will have
Complete understanding of C# with .NET 8
Complete understanding of Selenium with the latest and greatest changes
Designing a complete framework from the ground up
Idea to design a more extendable framework