Visual Studio 2013 Update 4 - CodedUI Assert on WinWindow CMD.Exe Command Prompt DisplayText RRS feed

  • Question

  • I am trying to validate that a command has run successfully on a command prompt, however I seem to be unable to do a .Text.Contains("0% loss") on the command prompt window. 

    When I try to use the codedui test builder I don't see the displaytext option.

    How do I an assert on the text in a command prompt in codedui?

    Ian Ceicys

    Tuesday, May 5, 2015 4:41 PM


  • Hi Ian,

    Glad to see you again.

    I also test it in my side, I get the same issue as yours, the coded UI Test couldn't capture the text value in the command prompt window, so I doubt that it would have a limitation for it.

    I met an issue before which is related to the text from the word before:


    I have one workaround for this issue even if I didn't test it, we could copy the text from the command prompt window to other file/control which supports the coded UI test, I mean that we could make sure that the coded UI test could capture the file text or the control text value after we paste it to a new file or control, and then use the custom code to check that whether the whole text value includes the specific value in it. We could copy the whole text value with the following control.

    Hope it could provide you a path for this issue.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, May 7, 2015 6:24 AM