简体   繁体   中英

Console not appearing when running Coded UI test

I am working on a Coded UI test, and what I need to do is prompt the user for a range of excel cells, the test then passes those ranges as strings into the method and pulls the data from those cells. I've got the passing/pulling the data working fine, but when I try to bring up a console for them to enter the data, no console window/command prompt is showing when I try run or debug.

[TestMethod]
[TestCategory("Organizations")]
public void CreateTestOrganization()
{
    Console.WriteLine("Enter range of cells of data required for creation.\n Min: A2, Max: AH11. USE ALL CAPS!");
    Console.WriteLine("First cell: ");
    string rangeOne = Console.ReadLine();
    Console.WriteLine("Last cell: ");
    string rangeTwo = Console.ReadLine();
    BrowserWindow.Launch(uri);
    CreateNewOrg cno = new CreateNewOrg(rangeOne, rangeTwo);
}

If you right click on your project and go to properties, under application is the output type set as Console Application? If it isn't change it to Console Application and see if that works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM