1

I have a simple test case developed by CodedUI:

  1. Open run by windows + r
  2. Add "iexplorer"
  3. Hit enter Navigate to my webpage
  4. Do an assertion.

I can run this on my local PC, but is there any way to set up this as a build pipeline at visualstudio.com?

Actually I did that, but I'm getting an error at the "Test Assemblies" stage:

Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: Unable to find the top level element of the control ---> Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: Unable to find Windows Internet
     Explorer window with 'C&W DASH - Internet Explorer' in the title. ---> Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: The playback failed to find the control with the given search properties. Additional Details:
    2018-11-09T17:41:41.6496491Z TechnologyName: 'MSAA'
    2018-11-09T17:41:41.6496660Z ControlType: 'Window'
    2018-11-09T17:41:41.6496907Z Name: 'C&W DASH - Internet Explorer'
    2018-11-09T17:41:41.6497064Z ClassName: 'IEFrame'   
    2018-11-09T17:41:41.6497222Z ---> System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.

1 Answer 1

1

I think you should use the Coded UI launch methods instead of starting the application with Windows. I think the visualstudio.com might not launch the test in an interaction desktop.

Code example, from here:

BrowserWindow oBrowser = BrowserWindow.Launch(new Uri(url));

Never the less MS is dropping Coded UI support and advices to switch to WebDriver:

Coded UI Test for automated UI-driven functional testing is deprecated. Visual Studio 2019 is the last version where Coded UI Test will be available. We recommend using Selenium for testing web apps and Appium with WinAppDriver for testing desktop and UWP apps. Consider Xamarin.UITest for testing iOS and Android apps using the NUnit test framework.

https://docs.microsoft.com/en-us/visualstudio/test/use-ui-automation-to-test-your-code?view=vs-2019

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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