locked
Coded UI Performance Tests fail after logging out of Citrix RRS feed

  • Question

  • I have created some Coded UI Performance Tests using Visual Studio 2010 ultimate. The tests run successfully after setting them up. However when I log out of citrix and then back in again the tests won't run. I'm not changing any of the settings. Has this been raised as an issue in the past.

    The tests I am running are - Open Word, Open Excel.

    Any advice would be really useful.

    Thanks.

    Tuesday, September 17, 2013 11:45 AM

Answers

All replies

  • Hi Paul,

    Thank you for posting in the MSDN forum.

    Just to make this issue clearly, what do you mean “I log out of citrix and then back in again”?

    What error do you get in your side?

    Please get the detailed coded UI test error message in your side, and share it to us.

    http://blogs.msdn.com/b/gautamg/archive/2009/11/29/how-to-enable-tracing-for-ui-test-components.aspx

    To make sure that it is not your VS IDE issue, please record a simple app with your coded UI test builder, and re-run it again as your precious steps.

    In addition, office Client Apps aren’t supported by the coded UI test.

    Reference:

    http://msdn.microsoft.com/en-us/library/dd380742(v=vs.100).aspx

    Best Regards,


    Jack Zhai[MSFT]
    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, September 18, 2013 6:40 AM
  • Hi,

    I can't seem to add the error message to the blog. Here is the error message I get:-

    Error Message

    Test method TestProject2.openword.CodedUITestMethod1 threw exception:

    Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: The playback failed to find the control with the given search properties. Additional Details:

    TechnologyName:  'MSAA'

    ControlType:  'Window'

    Name:  'Weightmans Desktop - Citrix XenApp Plugins for Hosted Apps'

    ClassName:  'wMFService001A01E6998'

     ---> System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.

    Error Stack Trace

    Microsoft.VisualStudio.TestTools.UITest.Playback.Engine.IRPFPlayback.FindAllScreenElements(IScreenElement pScreenElementStart, String bstrQueryId, Object& pvarResKeys, Int32 cResKeys, Int32 nMaxDepth, Object[]& foundDescendants)

    Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.FindTopLevelWindowHelper(String queryId)

    Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.FindFromPartialQueryId(String queryId)

    Microsoft.VisualStudio.TestTools.UITesting.UITestControl..ctor(String queryId)

    Microsoft.VisualStudio.TestTools.UITesting.Playback.MapControlNotFoundException(COMException ex, IPlaybackContext context)

    Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowComException(COMException innerException, IPlaybackContext context)

    Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, IPlaybackContext context)

    Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, String queryId)

    Microsoft.VisualStudio.TestTools.UITesting.UITestControl..ctor(String queryId)

    Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.SearchTopLevelWindow(ISearchArgument topLevelSearchArg, String topLevelElementQueryId)

    Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.GetTitleUpdatedTopLevelWindow(ISearchArgument topLevelSearchArg, String queryId, IList`1 windowTitles)

    Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.GetTopLevelElement(Boolean useCache, Boolean useCacheOnly, ISearchArgument searchArg, IList`1 windowTitles, Int32& timeLeft)

    Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.GetElement(Boolean useCache, ISearchArgument searchArg)

    Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.Search(ISearchArgument searchArg)

    Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindInternal()

    Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindControlIfNecessary()

    Microsoft.VisualStudio.TestTools.UITesting.UITestControl.DoubleClick(MouseButtons button, ModifierKeys modifierKeys, Point relativeCoordinates)

    Microsoft.VisualStudio.TestTools.UITesting.Mouse.DoubleClickImplementation(UITestControl control, MouseButtons button, ModifierKeys modifierKeys, Point relativeCoordinate)

    Microsoft.VisualStudio.TestTools.UITesting.Mouse.DoubleClickImplementationWrapper(UITestControl control, MouseButtons button, ModifierKeys modifierKeys, Point relativeCoordinate)

    Microsoft.VisualStudio.TestTools.UITesting.Mouse.DoubleClick(UITestControl control, Point relativeCoordinate)

    TestProject2.TestProject2.UIMap.RecordedMethod2() in c:\users\plewis1\documents\visual studio 2010\Projects\TestProject2\TestProject2\UIMap.Designer.vb: line 57

    TestProject2.openword.CodedUITestMethod1() in C:\Users\plewis1\documents\visual studio 2010\Projects\TestProject2\TestProject2\openword.vb: line 18

    Debug Trace

    W, 4136, 55, 2013/09/18, 10:09:02.494, 4621667913, QTAgent32.exe, Playback - [WARNING] Internal warning: Window Not Found: [VisibleOnly]ControlType='Window' && Name='Weightmans Desktop - Citrix XenApp Plugins for Hosted Apps' && ClassName='wMFService001A01E6998'

    \0

    E, 4136, 55, 2013/09/18, 10:09:02.496, 4621672318, QTAgent32.exe, <a - {1} [FAILED] Function ElementFetcher::FindScreenElement failed to locate UI element (Searching: ;[VisibleOnly]ControlType='Window' && Name='Weightmans Desktop - Citrix XenApp Plugins for Hosted Apps' && ClassName='wMFService001A01E6998') (The object specified was not found.)

    \0</a>

    E, 4136, 55, 2013/09/18, 10:09:02.690, 4622182764, QTAgent32.exe, Playback - [IMAGE] C:\Users\plewis1\AppData\Local\Temp\UITestLogs\LastRun\RPFBE04.png

    \0

    W, 4136, 55, 2013/09/18, 10:09:02.690, 4622183291, QTAgent32.exe, Playback - [WARNING] Internal warning: Couldn't find descendants that match QueryId

    \0

    W, 4136, 55, 2013/09/18, 10:09:02.690, 4622184576, QTAgent32.exe, PERF WARNING: FindTopLevelWindowHelper::FindAllDescendents: took 530 ms. Expected it to take maximum 500 ms.

    W, 4136, 55, 2013/09/18, 10:09:20.793, 4669916242, QTAgent32.exe, Playback - [WARNING] Internal warning: Window Not Found: [VisibleOnly]ControlType='Window' && Name='Weightmans Desktop - Citrix XenApp Plugins for Hosted Apps' && ClassName='wMFService001A01E6998'

    \0

    E, 4136, 55, 2013/09/18, 10:09:20.793, 4669917077, QTAgent32.exe, <a - {2} [FAILED] Function ElementFetcher::FindScreenElement failed to locate UI element (Searching: ;[VisibleOnly]ControlType='Window' && Name='Weightmans Desktop - Citrix XenApp Plugins for Hosted Apps' && ClassName='wMFService001A01E6998') (The object specified was not found.)

    \0</a>

    E, 4136, 55, 2013/09/18, 10:09:20.987, 4670429287, QTAgent32.exe, Playback - [IMAGE] C:\Users\plewis1\AppData\Local\Temp\UITestLogs\LastRun\RPF57F.png

    \0

    W, 4136, 55, 2013/09/18, 10:09:20.988, 4670429835, QTAgent32.exe, Playback - [WARNING] Internal warning: Couldn't find descendants that match QueryId

    \0

    W, 4136, 55, 2013/09/18, 10:09:20.988, 4670430475, QTAgent32.exe, PERF WARNING: FindTopLevelWindowHelper::FindAllDescendents: took 18295 ms. Expected it to take maximum 500 ms.

    W, 4136, 55, 2013/09/18, 10:09:21.562, 4671945426, QTAgent32.exe, Playback - [WARNING] Internal warning: Smart Match failed

    \0

    W, 4136, 55, 2013/09/18, 10:09:22.021, 4673153374, QTAgent32.exe, Playback - [WARNING] Internal warning: Smart Match failed

    \0

    W, 4136, 55, 2013/09/18, 10:09:22.488, 4674386046, QTAgent32.exe, Playback - [WARNING] Internal warning: Smart Match failed

    \0

    W, 4136, 55, 2013/09/18, 10:09:22.950, 4675602948, QTAgent32.exe, Playback - [WARNING] Internal warning: Smart Match failed

    \0

    W, 4136, 55, 2013/09/18, 10:09:23.393, 4676772359, QTAgent32.exe, Playback - [WARNING] Internal warning: Smart Match failed

    \0

    W, 4136, 55, 2013/09/18, 10:09:23.850, 4677976645, QTAgent32.exe, Playback - [WARNING] Internal warning: Smart Match failed

    \0

    W, 4136, 55, 2013/09/18, 10:09:24.170, 4678820644, QTAgent32.exe, Playback - [WARNING] Internal warning: Window Not Found: [VisibleOnly]ControlType='Window' && Name='Weightmans Desktop - Citrix XenApp Plugins for Hosted Apps' && ClassName='wMFService001A01E6998'

    \0

    E, 4136, 55, 2013/09/18, 10:09:24.170, 4678821205, QTAgent32.exe, <a - {3} [FAILED] Function ElementFetcher::FindScreenElement failed to locate UI element (Searching: ;[VisibleOnly]ControlType='Window' && Name='Weightmans Desktop - Citrix XenApp Plugins for Hosted Apps' && ClassName='wMFService001A01E6998') (The object specified was not found.)

    \0</a>

    E, 4136, 55, 2013/09/18, 10:09:24.356, 4679310888, QTAgent32.exe, Playback - [IMAGE] C:\Users\plewis1\AppData\Local\Temp\UITestLogs\LastRun\RPF12BA.png

    \0

    W, 4136, 55, 2013/09/18, 10:09:24.356, 4679311544, QTAgent32.exe, Playback - [WARNING] Internal warning: Couldn't find descendants that match QueryId

    \0

    W, 4136, 55, 2013/09/18, 10:09:24.356, 4679312188, QTAgent32.exe, PERF WARNING: FindTopLevelWindowHelper::FindAllDescendents: took 3368 ms. Expected it to take maximum 500 ms.

    E, 4136, 55, 2013/09/18, 10:09:24.358, 4679315731, QTAgent32.exe, Exception: System.Runtime.InteropServices.COMException

                    Message: Error HRESULT E_FAIL has been returned from a call to a COM component.

                    Stack Trace:    at Microsoft.VisualStudio.TestTools.UITest.Playback.Engine.IRPFPlayback.FindAllScreenElements(IScreenElement pScreenElementStart, String bstrQueryId, Object& pvarResKeys, Int32 cResKeys, Int32 nMaxDepth, Object[]& foundDescendants)

       at Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.FindTopLevelWindowHelper(String queryId)

                    BaseExceptionMessage: Error HRESULT E_FAIL has been returned from a call to a COM component.

    E, 4136, 55, 2013/09/18, 10:09:24.587, 4679920120, QTAgent32.exe, AL: Playback Error: Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: The playback failed to find the control with the given search properties. Additional Details:

    TechnologyName:  'MSAA'

    ControlType:  'Window'

    Name:  'Weightmans Desktop - Citrix XenApp Plugins for Hosted Apps'

    ClassName:  'wMFService001A01E6998'

     ---> System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.

       at Microsoft.VisualStudio.TestTools.UITest.Playback.Engine.IRPFPlayback.FindAllScreenElements(IScreenElement pScreenElementStart, String bstrQueryId, Object& pvarResKeys, Int32 cResKeys, Int32 nMaxDepth, Object[]& foundDescendants)

       at Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.FindTopLevelWindowHelper(String queryId)

       at Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.FindFromPartialQueryId(String queryId)

       at Microsoft.VisualStudio.TestTools.UITesting.UITestControl..ctor(String queryId)

       --- End of inner exception stack trace ---

       at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapControlNotFoundException(COMException ex, IPlaybackContext context)

       at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowComException(COMException innerException, IPlaybackContext context)

       at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, IPlaybackContext context)

       at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, String queryId)

       at Microsoft.VisualStudio.TestTools.UITesting.UITestControl..ctor(String queryId)

       at Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.SearchTopLevelWindow(ISearchArgument topLevelSearchArg, String topLevelElementQueryId)

       at Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.GetTitleUpdatedTopLevelWindow(ISearchArgument topLevelSearchArg, String queryId, IList`1 windowTitles)

       at Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.GetTopLevelElement(Boolean useCache, Boolean useCacheOnly, ISearchArgument searchArg, IList`1 windowTitles, Int32& timeLeft)

       at Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.GetElement(Boolean useCache, ISearchArgument searchArg)

       at Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.Search(ISearchArgument searchArg)

       at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindInternal()

       at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindControlIfNecessary()

       at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.DoubleClick(MouseButtons button, ModifierKeys modifierKeys, Point relativeCoordinates)

       at Microsoft.VisualStudio.TestTools.UITesting.Mouse.DoubleClickImplementation(UITestControl control, MouseButtons button, ModifierKeys modifierKeys, Point relativeCoordinate)

       at Microsoft.VisualStudio.TestTools.UITesting.Mouse.DoubleClickImplementationWrapper(UITestControl control, MouseButtons button, ModifierKeys modifierKeys, Point relativeCoordinate)

    W, 4136, 55, 2013/09/18, 10:09:24.721, 4680272659, QTAgent32.exe, IEDOM : StopSession of the plugin called before StartSession

    W, 4136, 55, 2013/09/18, 10:09:24.721, 4680272974, QTAgent32.exe, UIA : StopSession of the plugin called before StartSession

    Collected Files

    Test Files

    CodedUITestMethod1.png

    Wednesday, September 18, 2013 10:27 AM
  • Hi Paul,

    Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: The playback failed to find the control with the given search properties. Additional Details:

    TechnologyName:  'MSAA'

    ControlType:  'Window'

    Name:  'Weightmans Desktop - Citrix XenApp Plugins for Hosted Apps'

    ClassName:  'wMFService001A01E6998'

     ---> System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.

    I doubt that dynamic properties are one of the cause of failure, go through the below blog to know about hand coding. It would be better way to do hand coding.

     

    http://blogs.msdn.com/b/mathew_aniyan/archive/2009/02/12/hand-coding-a-coded-ui-test.aspx

    I also met the similar issue before, if possible, you could refer it, hope it could help.

    http://social.msdn.microsoft.com/Forums/en-US/f64c595b-fd97-4ebd-8470-5e362545e76f/web-page-popup-the-playback-failed-to-find-the-control-with-the-given-search-properties

    http://social.msdn.microsoft.com/Forums/en-US/dbf603f5-c07d-4542-a6d8-0cbdb8e59716/playback-failed-to-find-the-control-with-given-search-propertice

    Best Regards,


    Jack Zhai[MSFT]
    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, September 19, 2013 9:53 AM