The following steps will guide you on how to
run Selenium .NET (C#) tests using the examples
from the SeleniumHQ/seleniumhq.github.io repository.
Ensure you have the following installed:
- .NET SDK (8.0 or later)
- An IDE like Visual Studio or Visual Studio Code
- .NET CLI tools
Clone the Selenium documentation repository to your local machine:
git clone https://github.com/SeleniumHQ/seleniumhq.github.io.gitcd seleniumhq.github.io/examples/dotnet/SeleniumDocsInstall necessary dependencies using the .NET CLI:
dotnet restoreTo run all available tests:
dotnet testTo 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"