Visual Studio Selenium Test Starting Local Project Visual Studio Selenium Test Starting Local Project selenium selenium

Visual Studio Selenium Test Starting Local Project


In order to solve the problem, it is necessary to run the two projects at the same time, as mrfreester pointed out in comments:

  • The main project in order to be able to run the main application.
  • The test project which will access the running main application to test it.

As mrfreester suggested, you might use two visual studio instances and it will work. Yet, to enhance this solution and manage everything in just one visual studio instance, you can run the main project using Debug.StartWithoutDebugging (default keyboard shortcut is ctrl + f5). This will effectively run the server for the application without starting VS debug mode, allowing you (and your test project) to normally use the application. The application will run even if you close your browser.

Be noted: if you start your application debugging normally, when you stop the execution, the server will stop, and you will have to start again without debugging to be able to pass your tests again.