
Develop automated browser actions with Selenium in .NET and build a robust, efficient UI testing framework while expanding your skills through interactive lessons.
Develop automated Selenium web UI tests in C#, interact with the Selenium WebDriver and HTML elements, and build a robust UI test framework using a page object model.
Install Visual Studio Community Edition, set up the ASP.NET development workload, and sign in with a Microsoft account to complete your environment for C# Selenium test automation.
Create a NUnit test in Visual Studio by building a class library named SeleniumUI.Tests, installing NUnit and NUnit3TestAdapter, and decorating a public method with the [Test] attribute.
Install selenium libraries via NuGet: Selenium.WebDriver, Selenium.Support, and Selenium.WebDriver.ChromeDriver. Create a selenium test on SauceDemo.com to log in and verify Sauce Labs Backpack appears in the inventory.
Learn to automate a login in C# using Selenium with ChromeDriver, implicit waits, and CSS selectors for the user-name, password, and login-button on saucedemo.
Automate an end-to-end selenium test by collecting all titles with the CSS class inventory_item_name, extracting text with LINQ, and asserting that Sauce Labs Backpack appears in the results.
Below is the code snipper
Learn to craft basic XPath selectors by attribute, text, and contains functions, test them in the browser, and compare XPath's verbosity with CSS selectors for efficient element locating.
Learn CSS selector syntax to identify elements by id, class, tag, and attributes, using #, ., and [attribute=value], with concise syntax compared to XPath.
Learn to craft robust Selenium selectors using minimal ancestors and descriptive, unique attributes to withstand web page changes.
Apply practical selenium test automation by launching Chrome, navigating to eBay, and running a real-world search for Pokemon cards, selecting a product, and verifying the price on its details page.
Automate an ebay search for pokemon cards and click the first product. Anchor the selector to the srp-river-results container, switch tabs, and retrieve the price via data-testid.
Discover how to verify tests with fluent assertions in a c# selenium workflow by installing fluentassertions via nuget and using should and contain for readable validations, including price.
Explain how explicit waits replace implicit waits to reduce brittle Selenium tests, and implement extension methods like GetElement and GetElements to wait conditionally up to five seconds.
Master the Page Object Model (POM), mapping a web page to an object oriented class with actions and properties for reusable, maintainable top level entry page testing in Selenium.
Build an intermediate Selenium UI testing framework by creating a PomBase base class in a PageObjects folder, managing driver and related element, with Select methods for nested pages.
Create entry pages with a public static EntryPageFactory that returns page objects for a given web driver, and build an EntryPageBase with LoginPage and InventoryPage under their folders.
Implement login page object models by creating a shared text field and login button, then nest username and password fields on the login page with selectors '#user-name' and '#password'.
Design page objects by creating a ProductCard POM with a title and nesting it under InventoryPage as a list of ProductCards, using selectors .inventory_item and .inventory_item_name to verify backpack item.
Learn to implement the page object model in Selenium tests by using an entry page factory to authenticate, navigate to inventory, collect product names, and verify with fluent assertions.
Review how the page object model is implemented in the test framework, including PomBase, Select and SelectAll, and the EntryPageFactory for login and inventory pages.
Refactor the eBay test with a page object model, write pseudo code first, then build three entry pages using EntryPageFactory: landing, search results, and product details.
Refactor the eBay test into a page object model by creating eBay-specific POMs for landing, search results, and product details, and implement search with a text field and links.
Implement entry page initialization in a C# Selenium test framework by adding IEntryPage interface and overriding Initialize() to define load conditions with explicit waits for elements like logos or menus.
you have completed lessons and gained mastery in automating web browser actions. build selenium ui testing framework in c# and pursue automation across front-end ui, back-end api, and back-end databases.
Explore NUnit's set up, tear down, one-time set up, and one-time tear down to run prerequisites once, clean up after all tests, and boost test suite efficiency.
Learn how to speed up C# Selenium tests by enabling NUnit parallelization using the parallelizable attribute and scopes like children, all, and self to run tests concurrently or sequentially.
A beginner's course on Selenium Test Automation in Visual Studio–C#.
When it comes to Selenium, the abundance of information available on the internet can make it challenging to sift through and identify the most valuable resources. If you're like most people, when you have a learning goal in mind, you'd want to navigate from point A to point B as quickly and efficiently as possible, right? Sometimes, all we need is a little nudge in the right direction to jumpstart our journey.
Well, look no further! This course is tailored for students with zero background in Selenium and will take them as far as intermediate-level proficiency... should they wish. In addition to teaching the fundamental skills to perform automated Selenium actions, I will also impart my knowledge of how to build a robust and efficient UI testing framework.
My framework architecture, along with my teaching techniques, will not only keep you engaged but will also help you retain the information through hands-on interactive lessons. The concepts I'll cover are modern and highly relevant in the industry. My development techniques and approaches are also transferable to software engineering roles where good coding practices are highly marketable.
If you want to excel, then here is your opportunity to learn from a working professional like me, who has already curated all the information for you. I promise that you'll undoubtedly become more knowledgeable in Selenium testing upon completion of this course, or this one's on me. I'm looking forward to seeing your growth!
---
You can anticipate that this course will take 20-40 hours to complete. It's similar to assembling a computer for the first time; I may make it appear clear and easy, but you'll likely progress at a slower pace until you become fluent and familiar yourself!
The tools and resources used in this course are entirely free.