This is a migrated thread and some comments may be shown as answers.

[Solved] Closing of Window With Dynamic ID

6 Answers 21 Views
Automation Design Canvas
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Aaron Gorsky
Top achievements
Rank 1
Aaron Gorsky asked on 25 Feb 2010, 12:14 AM
I am attempting to do a basic test against our implementation of Microsoft Dynamics CRM.  In this test I am creating a new prospect which is fired from clicking a button.  This button opens a new popup window which, in turn, opens another popup window to perform a pre-search. I am attaching a screenshot of the Project Elements so you can see. The issue that I am having is that when the pre-search is completed the system will automatically close the popup.  This is recorded in the test explorer with an id value http://capomleaddev01/sfa/opps/edit.aspx?id=f20a81bd-9f21-df11-bd0b-000bcd9ce841.  I cannot leave this in the test because the id value will be different for each test. Once I save the new prospect record in 'CreateProspectLead' that window is closed. If I deselect this step everything seems to be OK except for the last portion of my test.... Once all the windows have been closed I am left with the original screen.  Within the test I want/need to click a button on the original screen.  In this instance I am trying to click the ProspectsNobrTag under FrameWorkspaceFrame.  When the test is run I receive the following error when it attemps to access this element.

ArtOfTest.Common.Design.Exceptions.ExecutionException: Unhandled exception thrown during automation step execution ---> System.Exception: Unable to find the target host (Browser/SilverlightApp) to locate an element. Failure:
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep()
   --- End of inner exception stack trace ---

I dont know if disabling the 'Close pop-up window:' actions is the root cause of this but I am not sure how to get around the id issue or how to identify why it cannot locate the button.  Any ideas on how to debug/fix?

Aaron

6 Answers, 1 is accepted

Sort by
0
Missing User
answered on 25 Feb 2010, 05:57 PM
Hello Aaron,

Thanks for the post and I'm sorry you ran into this problem. It seems like a rather complex scenario, and I'll try to reply as best I can based on your description.
 
For the test steps that records the connect to the popup and closes the popup with the complete url and id/query string you posted, you can change the url for the popup in the test steps' properties.

Please right click on the test step and select properties. Then in the Visual Studio Poperties window, you can change the url to be partial so that it uses as much of the popup window's url as possible without using the id/query string.

This should help in that you can record the sequence as you normally would with the popups, and can avoid the error in the test step from the screenshot. The error looks to be that the test is not finding the element on the current page since it maybe on the wrong browser instance.

Please post back if this does not help, and perhaps we can setup a Live Meeting to resolve this more easily.

All the best,
Nelson Sin
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Konstantin Petkov
Telerik team
answered on 26 Feb 2010, 08:21 AM
Hi Aaron,

This is just to update you about this problem.

The latest release of WebUI Test Studio from February 24th (labeled 2009.3.1424) resolves the problem with the Html recording in an IFrame having dynamically generated source url Nelson mentioned. If you want to give it a try, for all the updates in this product version, please review the changes listed here.

All the best,
Konstantin Petkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Aaron Gorsky
Top achievements
Rank 1
answered on 01 Mar 2010, 05:56 PM
Hello,

I downloaded the latest version and the good news is that I was able to get farther in my test.  The system was able to find and click the button it was erroring on previously... However, it is now failing on the step after the clicking of the button where it inputs data into a textbox on that same screen.  Below is the error message that I receive.  Would it be possible to setup a LiveMeeting to walk someone through this.

Aaron

ArtOfTest.Common.Design.Exceptions.ExecutionException: Unhandled exception thrown during automation step execution ---> ArtOfTest.WebAii.Exceptions.ExecuteCommandException
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request)
   at ArtOfTest.WebAii.Core.Actions.SetText(Element targetElement, String text)
   at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.SetTextActionDescriptor.Execute(Browser browser)
   at ArtOfTest.WebAii.Design.Extensibility.HtmlActionDescriptor.Execute(IAutomationHost autoHost)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep()
   --- End of inner exception stack trace ---
0
Cody
Telerik team
answered on 01 Mar 2010, 07:58 PM
Hello Aaron Gorsky,

I am glad to hear the latest version is an improvement for you. Yes, we'd be happy to work with you via Live Meeting. Can you schedule it for sometime Tuesday between 9am and 5pm (GMT - 6)?

Best wishes,
Cody
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Aaron Gorsky
Top achievements
Rank 1
answered on 01 Mar 2010, 08:01 PM
I am available anytime between 9am - 5pm Pacific.  Just send me an email with the meeting time and link so that I can block the time.

Thanks for all the help!

Aaron
0
Cody
Telerik team
answered on 11 Mar 2010, 03:50 PM
Hi Aaron Gorsky,

Just to follow up on the email I sent directly to you. I found that there seems to be a difference between the behavior of your CRM applicaton when it was recorded and when it is being played back. During recording, WebUI saw the elements being contained inside an IFrame and so it recorded them that way. But during playback that IFrame is not there. As a result it's looking for the IFrame it saw during recording, not finding it, and therefore throwing the error you see.

Please investigate why this difference in behavior of your application. Or can you demonstrate/prove that WebUI is incorrectly recording the elements as being contained in an IFrame when no IFrame actually exists. I was not able to reproduce such a problem in the VPC image you sent me. It was recording and playing back just fine for me.

All the best,
Cody
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Automation Design Canvas
Asked by
Aaron Gorsky
Top achievements
Rank 1
Answers by
Missing User
Konstantin Petkov
Telerik team
Aaron Gorsky
Top achievements
Rank 1
Cody
Telerik team
Share this question
or