This folder contains a C# NUnit Selenium sample
- .NET SDK installed (current project targets
net10.0/net7.0) - A valid BitBar API key
UnitTest1.cs: Main sample testBitbarSeleniumSampleCSharp.csproj: Project file and dependencies
From this folder:
dotnet test BitbarSeleniumSampleCSharp.csprojUpdate capabilities in UnitTest1.cs as needed:
- platformName
- browserVersion
- bitbar:options (project, testrun, apiKey, osVersion, resolution)
-
SDK version mismatch (
NETSDK1045): If your local SDK does not support the target framework, install a compatible SDK or change the target framework inBitbarSeleniumSampleCSharp.csproj.Example to install/check SDK:
dotnet --list-sdks
-
Need to update Selenium WebDriver version: If tests fail after browser or API-side changes, update
Selenium.WebDriverto a newer compatible version.dotnet add BitbarSeleniumSampleCSharp.csproj package Selenium.WebDriver --version 4.33.0 dotnet restore
-
Package restore/build issues after version change: Clean and restore dependencies before running tests again.
dotnet clean BitbarSeleniumSampleCSharp.csproj dotnet restore BitbarSeleniumSampleCSharp.csproj dotnet test BitbarSeleniumSampleCSharp.csproj