Skip to content

Latest commit

 

History

History
61 lines (44 loc) · 1.44 KB

File metadata and controls

61 lines (44 loc) · 1.44 KB

Running Selenium .NET (C#) Tests

The following steps will guide you on how to
run Selenium .NET (C#) tests using the examples
from the SeleniumHQ/seleniumhq.github.io repository.

Initial Setup

Prerequisites

Ensure you have the following installed:

Clone the repository

Clone the Selenium documentation repository to your local machine:

git clone https://github.com/SeleniumHQ/seleniumhq.github.io.git

Navigate to the .NET directory

Change into the .NET examples directory:

cd seleniumhq.github.io/examples/dotnet/SeleniumDocs

Running the Tests

Restore dependencies

Install necessary dependencies using the .NET CLI:

dotnet restore

Run all tests

To run all available tests:

dotnet test

Run a Specific Test Method

To run a specific test method using its fully qualified name:

dotnet test --filter "FullyQualifiedName=Namespace.ClassName.MethodName"

For example:

dotnet test --filter "FullyQualifiedName=SeleniumDocs.GettingStarted.UsingSeleniumTest.EightComponents"

You can also filter by test name only (if it's unique):

dotnet test --filter "Name=EightComponents"