locked
[CodedUI] QTAgent32.exe, IEDOM : StopSession of the plugin called before StartSession RRS feed

  • Question

  • Dear,

    When I write the 2 lines in a [TestMethod] and try to run, it reports errors.

    Code:

      Image myImage = UITestControl.Desktop.CaptureImage();
      myImage.Save(@"D:\Test.png", System.Drawing.Imaging.ImageFormat.Png);

    Error:

    Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetPropertyValue(String propertyName)
    Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetProperty(String propertyName)
    Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetPropertyInternal[T](String propertyName)
    Microsoft.VisualStudio.TestTools.UITesting.UITestControl.get_BoundingRectangle()
    Microsoft.VisualStudio.TestTools.UITesting.UITestControl.CaptureImage()
    Microsoft.VisualStudio.TestTools.UITesting.Playback.CaptureScreenShot(UITestControl control)
    Microsoft.VisualStudio.TestTools.UITesting.Playback.GetUITestControlString(UITestControl control)
    Microsoft.VisualStudio.TestTools.UITesting.Playback.AddUITestControlDescriptionToException(SystemException exception, IPlaybackContext context)
    Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, IPlaybackContext context)
    Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, String actionName, UITestControl uiControl)
    Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, String actionName, Object parameterValue, UITestControl uiControl)
    Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetPropertyValue(String propertyName)
    Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetProperty(String propertyName)
    Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetPropertyInternal[T](String propertyName)
    Microsoft.VisualStudio.TestTools.UITesting.UITestControl.get_BoundingRectangle()
    Microsoft.VisualStudio.TestTools.UITesting.UITestControl.CaptureImage()
    *.*.Test() in E:\*\*.cs: line 38

    Background:

    The project (ProjectB) is originally a UnitTest ([TestClass] before the class defininion) and I add 3 reference and Import the UITesting classes and change the [TestClass] to [CodedUITest]. But it reports this error.

    But the strange point is: I change another project (ProjectA) in the same way and it works, I can find the PNG image. And ProjectB depends on ProjectA.

    Thank you in advance!

    Best Regards,

    Xiao


    Monday, May 28, 2012 5:06 AM

All replies

  • Hi Xiao,

    This error is not ideally happen while changing a unite test to code UI Test by the way you mentioned. I would like to know which references shown in project?

    Best Regards,


    Tony Xiao [MSFT]
    MSDN Community Support | Feedback to us


    Tuesday, May 29, 2012 9:04 AM
    Moderator