0

I am getting this error despite setting the option "Set as startup project". My application is a web based (browser) application. I have tried all other options and it does not work. Please advise ?

Screenshot

  • Possible duplicate of [Cannot debug a unit testing project in Visual Studio 2012](https://stackoverflow.com/questions/12594018/cannot-debug-a-unit-testing-project-in-visual-studio-2012) – Rescis Dec 29 '17 at 20:22
  • Possible duplicate of [Visual Studio Coded UI test won't run - startup object empty](https://stackoverflow.com/questions/24499015/visual-studio-coded-ui-test-wont-run-startup-object-empty) – AdrianHHH Jan 02 '18 at 09:14
  • Has one of the suggested duplicates solved your problem? If yes then please accept that duplicate so the question can be closed. If not then please [edit] the question to further explain the question. – AdrianHHH Jan 16 '18 at 23:03

1 Answers1

0

Make sure to put 'CodedUI' and 'TestMethod' attributes in your test class and test methods, else you would get such error.

[CodedUITest]
public class CodedUITest1
{
    [TestMethod]
    public void CodedUITestMethod1()
    {
         BrowserWindow br = new BrowserWindow();
         BrowserWindow.Launch("www.Google.com");
    }
}