Selenium C# Articles
RSS feed32 articles found in Selenium C#
Discover these C# testing frameworks for 2026 and streamline your test automation in building high-quality web and mobile applications.

Suryapratap Singh Chauhan
February 10, 2025
37 min read
Explore the top Selenium C# frameworks for automation testing in 2026, including NUnit, xUnit, and MSTest, to enhance your testing efficiency.

Himanshu Sheth
February 7, 2025
33 min read
Selenium WebDriver commands are the methods used to run your Selenium test automation scripts. Here are the commands you need to automate browser actions.

Himanshu Sheth
January 30, 2025
32 min read
Selenium C# scrolls a page by casting the WebDriver to IJavaScriptExecutor and running JavaScript through ExecuteScript, since Selenium's built-in methods do not handle scrolling reliably on their own. Common examples scroll by a fixed 250 pixels, jump to the page bottom, or bring a specific element into view with scrollIntoView, using Selenium.WebDriver 4.49.0 via NuGet.
Andreea Draniceanu
September 10, 2024
21 min read
In this tutorial, you will learn about generating NUnit reports along with some new features and advantages of ExtentReports.

Himanshu Sheth
June 24, 2024
27 min read
The ScenarioContext class is a shared context object used in SpecFlow to share data between different steps and scenarios. This tutorial demonstrates using SpecFlow and ScenarioContext to share data between steps.
Andreea Draniceanu
January 9, 2024
30 min read
Finding an element by text in Selenium C# means using the XPath locator strategy to select a web element based on its visible text rather than an ID or class name. FindElement returns the first matching element, FindElements returns every match as a list, and normalize-space ignores leading or trailing spaces in the text.
Andreea Draniceanu
October 26, 2023
29 min read
NUnit provides methods to run multiple test cases, saving time and while ensuring high code quality. In this tutorial, learn how to run multiple NUnit test cases in parallel.
Andreea Draniceanu
October 9, 2023
26 min read
In this Selenium C# tutorial, you will learn about the IWebDriver browser commands in C# and how to use them effectively in your testing efforts.
Andreea Draniceanu
April 25, 2023
25 min read
WebDriverWait in Selenium C# is an explicit wait from the OpenQA.Selenium.Support.UI package that pauses a test until a condition like ElementToBeClickable is met, checking every 250 milliseconds by default. An MSTest example downloads a file, waits for a Close button to become clickable, and runs on a cloud Selenium Grid using Chrome 101 on Windows 11.
Andreea Draniceanu
February 10, 2023
24 min read
Selenium C# refreshes a page three ways: the Navigate().Refresh() command, Navigate().GoToUrl() pointed at the current URL, or simulating an F5 keypress. Refreshing re-attaches elements to the DOM, which avoids StaleElementReferenceException, the error thrown when a previously located element has been detached or removed, distinct from NoSuchElementException, where the element was never found at all.
Andreea Draniceanu
January 6, 2023
16 min read
Learn how to use driver.FindElement and driver.FindElements in Selenium C# to locate one or many web elements with ID, CSS, XPath and relative locators.
Andreea Draniceanu
December 20, 2022
28 min read
In Selenium C#, the SelectElement class from the Selenium.Support package selects and deselects options in HTML dropdowns defined by the select tag, letting a script choose values without clicking each option. The class's IsMultiple property returns true when a dropdown allows multiple selections, and its SelectByIndex method numbers options starting from zero rather than one.
Andreea Draniceanu
July 8, 2022
22 min read
Learn how to scrape dynamic web pages in this guide. Discover several scraping dynamic page strategies and tools to easily and efficiently collect data.

Himanshu Sheth
March 29, 2021
28 min read
The three C# unit testing frameworks head-to-head: syntax, parallelism, speed, and ecosystem, with a clear recommendation for your next project.

Himanshu Sheth
March 22, 2021
39 min read
XUnit Parameterized tests allow testers to run the same test a few times using different values. Find out how you can do this in xUnit with InlineData, MemberData, and ClassData.

Himanshu Sheth
March 18, 2021
16 min read
Learn about the MSTest Framework using .Net Core in Selenium C# and the aspects related to cross browser testing and parallel testing in this MSTest tutorial.

Himanshu Sheth
March 6, 2021
30 min read
Learn how to use annotations in NUnit for Selenium-based automation testing. We will look at an example for each annotation along with their attributes.

Himanshu Sheth
March 1, 2021
39 min read
In this NUnit tutorial, you will learn how to use different asserts in NUnit and see how they are helpful in Selenium automation testing.

Himanshu Sheth
February 8, 2021
33 min read
Want to setup NUnit environment for your first test? In this NUnit tutorial, you will learn to setup a test runner and Selenium WebDriver with Visual Studio for NUnit test case development.

Himanshu Sheth
February 3, 2021
15 min read
Learn NUnit parameterized tests with examples for efficient cross-browser testing by testing code against different input values for a better web experience.

Himanshu Sheth
December 2, 2020
24 min read
Moving on with our xUnit testing tutorial series, this blog will guide you in using xUnit testing framework with Selenium C#.

Himanshu Sheth
October 16, 2020
12 min read
Using SpecFlow with Selenium C# is a crucial part of automation testing with Selenium, this SpecFlow tutorial will guide you through the entire process.

Himanshu Sheth
August 28, 2020
40 min read
xUnit is an open-source unit testing framework for .NET. This xUnit testing tutorial will help you learn how to run unit testing with Selenium C#.

Himanshu Sheth
July 22, 2020
46 min read
Learn Selenium C# testing: environment setup, popular frameworks like NUnit and SpecFlow, and Visual Studio tutorials with real code examples.

Himanshu Sheth
May 19, 2020
8 min read
The Page Object Model is a design pattern that represents each web page as a separate class containing its elements and the methods to interact with them, keeping test code from touching the UI directly. This Selenium C# tutorial shows how POM cuts code duplication, limits the fallout from locator changes, and improves reusability and maintainability.

Himanshu Sheth
April 24, 2020
31 min read
Selenium C# handles frames and iframes through the SwitchTo() command, using a unique window handle to target them by frame id, frame name, or a web element locator such as XPath or CssSelector. SwitchTo().DefaultContent() returns to the page's main document, and SwitchTo().ParentFrame() moves back up to the parent of the currently selected frame, which also covers nested frames.

Himanshu Sheth
April 16, 2020
18 min read
Selenium C# assigns each browser window a unique alphanumeric window handle when the WebDriver instance opens it, and the SwitchTo() command uses that handle to move focus between windows, tabs, or pop-ups. The WindowHandle property returns the current window's handle as a string, while WindowHandles returns a read-only collection of every open handle.

Himanshu Sheth
April 10, 2020
18 min read
Alert windows in Selenium C# are blocking pop-ups that require a user action, such as accept, dismiss, or SendKeys, before the underlying page continues, and switching to one requires calling SwitchTo() first. NUnit-based Selenium C# examples cover each alert type, including authentication alerts, using accept, dismiss, and SendKeys operations.

Himanshu Sheth
April 3, 2020
15 min read
Explicit wait in Selenium uses the WebDriverWait class to pause a script only until a specific condition, such as an element becoming visible or clickable, is met, with a default polling interval of 500 milliseconds. This Selenium C# tutorial shows how to implement explicit and fluent wait in test automation scripts for more stable execution.

Himanshu Sheth
March 27, 2020
20 min read
Implicit wait in Selenium C# is a WebDriver setting that polls the DOM every 500ms until an element loads, set via driver.Manage().Timeouts().ImplicitWait.

Himanshu Sheth
March 20, 2020
12 min read
Selenium C# test automation in Visual Studio starts with installing Visual Studio Community Edition, downloading the Selenium WebDriver client driver, and creating an NUnit test project. The example test navigates to google.com, enters a search term via a CSS selector, and clicks Google Search, with ChromeDriver launched in NUnit's SetUp method and closed in TearDown.

Himanshu Sheth
March 13, 2020
12 min read










![How To Refresh Page Using Selenium C# [Complete Tutorial]](https://assets.testmuai.com/resources/uploads/2023/01/Refresh2520Page2520Using2520Selenium2520C2523-1.png)




















