none
Crashing during playback on IE11

    Question

  • My Code UI test is crashing again again just after browser window open.

    We have VS2010 SP1 Installed.

    Below is the code line:

     BrowserWindow bingcomBrowser = BrowserWindow.Launch(new System.Uri(this.LaunchBingParams.Url));

    Event Viewer Info:

    The description for Event ID 0 from source Microsoft Test Manager cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

    If the event originated on another computer, the display information had to be saved with the event.

    The following information was included with the event:

    Specified cast is not valid.Stack Trace ==>   at Microsoft.VisualStudio.TestTools.UITest.Extension.NativeMethods.ObjectFromLresult(IntPtr msgcallResult, Guid refGuid, IntPtr resultRef)

       at Microsoft.VisualStudio.TestTools.UITest.Extension.NativeMethods.GetDocumentFromWindowHandle[T](IntPtr windowHandleOfIE)

       at Microsoft.VisualStudio.TestTools.UITest.Extension.IE.CommonBrowserUtility.WebBrowserFromWindowHandle(IntPtr handle, STAHelperThread staHelperObject, IsPlaybackCanceled playbackCanceled, IntPtr& documentWindowHandle)

       at Microsoft.VisualStudio.TestTools.UITesting.IEBrowserService.UpdateWebBrowserReference()

       at Microsoft.VisualStudio.TestTools.UITesting.IEBrowserService.<>c__DisplayClass5.<Locate>b__4()

       at Microsoft.VisualStudio.TestTools.UITesting.ALUtility.PerformRetryOperation(RetryOperation operation, Int32 timeout)

       at Microsoft.VisualStudio.TestTools.UITesting.IEBrowserService.Locate(IntPtr handle)

       at Microsoft.VisualStudio.TestTools.UITesting.IEBrowserFactory.Locate(IntPtr handle)

       at Microsoft.VisualStudio.TestTools.UITesting.BrowserWindow.get_BrowserService()

       at Microsoft.VisualStudio.TestTools.UITesting.BrowserWindow.get_CurrentDocumentWindow()

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

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

       at Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.GetUITestControlRecursive(Boolean useCache, Boolean alwaysSearch, 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.Click(MouseButtons button, ModifierKeys modifierKeys, Point relativeCoordinates)

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

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

       at Microsoft.VisualStudio.TestTools.UITest.CodeGeneration.UIActionInterpreter.Invoke(MouseAction action, UIMap map)

       at Microsoft.VisualStudio.TestTools.UITest.Common.MouseAction.Invoke(UITestActionInvoker actionInvoker, UIMap map)

       at Microsoft.VisualStudio.TestTools.UITest.CodeGeneration.UITestInterpreter.ExecuteAction(UITestAction action)

       at Microsoft.VisualStudio.TestTools.UITest.CodeGeneration.UITestInterpreter.ExecuteStepInternal(UITestAction action, Boolean& retryStep)

       at Microsoft.VisualStudio.TestTools.UITest.CodeGeneration.UITestInterpreter.IterateActionList(UITestActionListSection ActionListSection, Int64 startId, Int64 stopId)

       at Microsoft.VisualStudio.TestTools.UITest.CodeGeneration.UITestInterpreter.ExecuteTest(Int64 startId, Int64 stopId)

       at Microsoft.VisualStudio.TestTools.ManualTest.Common.AFNPlayback.OnPlayback(Object afnPlaybackSegment)

       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)

       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)

       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

       at System.Threading.ThreadHelper.ThreadStart(Object obj)

    Saturday, July 12, 2014 4:56 PM

Answers

  • Hi,

    Based on this document: http://msdn.microsoft.com/en-us/library/dd380742(v=vs.100).aspx VS2010 only support IE 7/IE 8/IE9. Through the error message, probably it means that the component which supports IE 11 did not installed  or was corrupted. Maybe there is anything wrong about VS2010 Coded UI test support IE11.

    In order to check this issue is related to the IE version, could you please record a new and simple coded UI test against www.bing.com on IE 11 browser and run test to check the result? Please try it.

    If you do not record one web application, I mean you just record a desktop application (winform for example), will you get the same issue? Please clarify it.

    If all tests against IE 11 will fail and the test against desktop app will succeed, I doubt that this issue was caused because the incorrect IE supported version. For VS2010 Coded UI test, please use IE9/8/7 instead of IE11.

    If the issue only occurred in the specific web application against IE 11, please add a small wait (2 second or so) using Playback.Wait(): http://msdn.microsoft.com/en-us/library/dd984394(v=vs.100).aspx  before performing the first action on a opened page.

    If other Coded UI tests against desktop app also can get this issue, based on the error message, I doubt that your VS/MTM is corrupted. Please repair your VS and restart PC and VS to run test. If the issue still exists, please reinstall your VS.

    Thanks,


    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.



    Monday, July 14, 2014 7:02 AM
    Moderator

All replies

  • HI Nahid,

    I think this thread is specific to Test for Visual Studio forum. So I am helping you to move this thread directly into that forum. Thank you for your understanding.

    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. &lt;br/&gt; Click &lt;a href=&quot;http://support.microsoft.com/common/survey.aspx?showpage=1&amp;scid=sw%3Ben%3B3559&amp;theme=tech&quot;&gt; HERE&lt;/a&gt; to participate the survey.

    Monday, July 14, 2014 2:23 AM
  • Hi,

    Based on this document: http://msdn.microsoft.com/en-us/library/dd380742(v=vs.100).aspx VS2010 only support IE 7/IE 8/IE9. Through the error message, probably it means that the component which supports IE 11 did not installed  or was corrupted. Maybe there is anything wrong about VS2010 Coded UI test support IE11.

    In order to check this issue is related to the IE version, could you please record a new and simple coded UI test against www.bing.com on IE 11 browser and run test to check the result? Please try it.

    If you do not record one web application, I mean you just record a desktop application (winform for example), will you get the same issue? Please clarify it.

    If all tests against IE 11 will fail and the test against desktop app will succeed, I doubt that this issue was caused because the incorrect IE supported version. For VS2010 Coded UI test, please use IE9/8/7 instead of IE11.

    If the issue only occurred in the specific web application against IE 11, please add a small wait (2 second or so) using Playback.Wait(): http://msdn.microsoft.com/en-us/library/dd984394(v=vs.100).aspx  before performing the first action on a opened page.

    If other Coded UI tests against desktop app also can get this issue, based on the error message, I doubt that your VS/MTM is corrupted. Please repair your VS and restart PC and VS to run test. If the issue still exists, please reinstall your VS.

    Thanks,


    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.



    Monday, July 14, 2014 7:02 AM
    Moderator
  • Hi,

    What about your issue now?

    If you have resolved it, you can share the solution here, which will be beneficial for other members with the same issue.

    If you did not, please tell us the result of my suggestion, I will try my best to help you.

    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.

    Friday, July 18, 2014 7:53 AM
    Moderator