UI Automation With C# and Selenium: Adding Your Project to GitHub

The Takeaway: Using GitHub as your repository for version control makes development of your automation solution MUCH easier!

An important element of your automation project is to make sure you can keep it backed up and available. 

A great way to do that is with GitHub. As a version control system and repository, GutHub allows you to keep track of changes in your automation solution, make the code available to others working on the project, and fork your project in order to further develop the project in new directions.

This article will assume that you:

  • Already understand the basics of version control and repositories. If not, this video and associated YouTube channel can help out there
  • Already have a GitHub username and password. If not, do that here
  • Already have the GitHub Extension installed as part of Visual Studio, If not, here it is. 
  1. Open your Automation solution in Visual Studio. 
  2. Right-click on the solution for the project and select Add Solution to Source Control

    Visual Studio - Add Solution to Source Control
    Visual Studio – Add Solution to Source Control
  3. At this point, Visual Studio will create a git folder in the folder where your solution is saved (which is typically hidden). This folder is needed to keep track of changes to your solution

    Visual Studio - Git Folder Created
    Visual Studio – Git Folder Created
  4. You will also notice that your solution, folders, and files have a blue lock on them

    Visual Studio - Solution Locked
    Visual Studio – Solution Locked
  5. Navigate to the Team Explorer window

    Visual Studio - Team Explorer Home
    Visual Studio – Team Explorer Home
  6. Click the Sync link, and the Publish to GitHub option should display

    Visual Studio - Publish to GitHub
    Visual Studio – Publish to GitHub
  7. Click the Get Started link. Since the repository you just created doesn’t haver a remote version, we can use this tool to create a version on the GitHub website

    Visual Studio - Repository Details
    Visual Studio – Repository Details
  8. Click Publish. Now you should be able to go to your GitHub Profile, click your Repositories link, and view your repo
    GitHub - New Repository
    GitHub – New Repository

    Click here to find the above page, so you can either clone or download the files for this solution as well!

UI Automation With C# and Selenium, Part I

For the past few years, I’ve struggled with a desire to publish a “how-to” series
on automation. On one hand, there are already LOTS of resources out there, frankly, written by people much better at development and programming than


I am. Dave Haeffner, for example, does a great job of explaining how to get started in his Selenium Guidebook. And now that it’s available in multiple languages (Java, Ruby, C#, Python, JavaScript), that’s an awesome resource for anyone looking to get started in UI and browser automation.

However, as I’ve grown as an automation engineer, especially in the past year, I still find it hard to find resources that do a great job of explaining how to expand your automation palette, moving beyond the


basic ideas of UI automation, and including:

  • Data-Driven Automation and Testing
  • Keyword-Driven Automation and Testing
  • API Automation and Testing
  • Security Testing

Furthermore, finding resources that speak to the implementation of these ideas in a C#/.NET environment is even more difficult. 

So, the idea is to show some real-life examples of how to implement an automation solution for testing websites and browser-based applications.

Check out my webiste to get an idea of the tools I use in my own automation.


Some of the ideas I share are ones that I implement in my own work, some may not be. Some may be ones that I figure out while I’m writing these articles and implement because of them.

If you have ANY questions or want to discuss anything, please feel free to comment or e-mail me.