Home Dashboard Directory Help
Search

Recorded UI Test - COMException when trying to find a button in IE's popup window by romario3


Status: 

Closed
 as Fixed Help for as Fixed


1
0
Sign in
to vote
Type: Bug
ID: 597945
Opened: 9/15/2010 1:32:20 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

I have recorded a coded UI test for web application running in Internet Explorer 8. During test popup window is opened twice, test fails on the second popup with:

Error Message:
Test method TestProject1.CodedUITest1.CodedUITestMethod1 threw exception:
Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: The playback failed to find the control with the given search properties. Additional Details:
TechnologyName:  'Web'
ControlType:  'Document'
TagName:  'BODY'
Id:  ''
RedirectingPage:  'False'
FrameDocument:  'False'
 ---> System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.

Detailed test result is attached.

I have also created simple test project - it contains web application and UI test, run web application in IE and then run UI test, it should fail.
Details
Sign in to post a comment.
Posted by Microsoft on 11/11/2010 at 5:07 AM
Romario,

When UI Test framework searches for the second popup window, it is failing because it is trying to use a cached reference. The workaround is to perform a find on the Window.
this.UIDialogwebovéstránkyWindow.Find();
This has to be done before clicking on the Close button second time.

NOTE: Please do not change UIMap.Designer.cs. You need to copy the code to UIMap.cs, rename the method and make the changes described above.

This is a bug which will be fixed in the next release of Visual Studio.


Mathew Aniyan
Program Manager - Visual Studio ALM.
Posted by Microsoft on 9/15/2010 at 1:56 AM
Thanks for your feedback. We are routing this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
test-result-detail.TXT 9/15/2010 19 KB
UITest.zip 9/15/2010 274 KB