-2

I created a brand new Coded UI Project and started to record the project. Once, I was done with recording, I click Generate code to create the code for the script.

When I click the 'Start' button after clicking 'Build' > 'Build Solution', I run into the following error: 'A Project with and Output Type of Class Library cannot be started directly. In order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project'

So, I went ahead right clicked the project and clicked 'Set as Startup Project' and saved and tried to run again. However, still the issue was not resolved.

I also right click the project and went to its Properties > Application > change output type to Windows Application'. Then, I get the error message 'Program does not contain a static Main method suitable for an entry point'

When I google the solution for this, the solution is to change it back to output type Class Library'

So, basically it keeps going back and forth and one solution actually leads to error for the other.

Is there a way I can Play the recorded piece by resolving these errors?

0

1 Answer 1

0

The issue is that the coded UI tests are a class library, and per the error they cannot be started.
To sole this:

  • You can write a program to launch them through something such as a terminal - this occasionally seen done with selenium based tests
  • You can right click on the test method and click "Debug Tests", or "Run Tests", depending on what you want to do.
  • You can click on the windows drop down, select "Test Explorer, build the solution, and run/debug accordingly from there..

Not the answer you're looking for? Browse other questions tagged or ask your own question.