Set up and Run Selenium C# Tests in Visual Studio Code on macOS

How to use VSCode on macOS to run C# Selenium tests

Courtney Zhan
4 min readApr 2, 2023

--

Readers of my and my father’s blog know that we love to use Ruby to script automated tests. Some might wonder, “Is your view on the best language for test automation changed? Also, C# on macOS?”. This is just a curious exercise for a request. My love for the wonderful Ruby language is the same, probably even more so after this exercise.

Install Visual Studio Code first. The version I used is v1.76 on macOS 12.6.

Table of Contents:
1. Install .NET SDK (7.0)
2. Install C# and Nuget package manager extensions into VS Code
3. Create a MSTest Project Folder
4. Open the newly created test project folder in VS Code
5. Add the Selenium WebDriver package to the Test Project
6. First Selenium C# test

1. Install .NET SDK (7.0)

Download from https://dotnet.microsoft.com/en-us/download/dotnet/7.0. I chose the…

--

--