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

Frame index error when HtmlControl.Click()

5 Answers 123 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
macon
Top achievements
Rank 1
macon asked on 24 May 2010, 10:00 AM
We're developing a test framework around WebAii and we're consistently getting the following error when doing HtmlControl.Click(false). I've seen a couple other posts related to this error but neither cure our problem. Unfortunately it's going to be a bit tricky to produce a concise repro as it's all embedded within a larger framework.

Anyone seen this before and have a solution?

Thanks,
Matt

Error
ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed!
InError set by the client. Client Error:
System.IndexOutOfRangeException: Current frame index '0' is out of range of current frames count '0'
   at ArtOfTest.InternetExplorer.IECommandProcessor.SetTargetDocument(BrowserCommand& request, IHTMLDocument2 document)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)
BrowserCommand (Type:'Information',Info:'DocumentMarkup',Action:'NotSet',Target:'null',Data:'',ClientId:'Client_74853fed-16ca-4b7b-8fbf-396393255c7c',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'0',InError:'True',Response:'System.IndexOutOfRangeException: Current frame index '0' is out of range of current frames count '0'
   at ArtOfTest.InternetExplorer.IECommandProcessor.SetTargetDocument(BrowserCommand& request, IHTMLDocument2 document)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)')
InnerException: none.

Stack trace
ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
ArtOfTest.WebAii.Core.Browser.RefreshDomTree()
ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request)
ArtOfTest.WebAii.Core.Actions.Click(Element targetElement)
ArtOfTest.WebAii.Controls.HtmlControls.HtmlControl.Click()
<our code>

5 Answers, 1 is accepted

Sort by
0
Missing User
answered on 24 May 2010, 05:29 PM
Hi macon,

Does a click on the page control automatically close out the frame? If so, try using HtmlControl.Click(true);

Also, you can try the latest framework release to see if some of the fixes there may help.

If none of the above work, please reply back with as much detail as you can on the scenario in question so that we can try some other things based on your applications setup.

Kind regards,
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
macon
Top achievements
Rank 1
answered on 25 May 2010, 09:42 AM
The click event does not close the Browser but it will transition the browser from a page with IFrames to a page without. According to the documentation the Click(true) is only needed when the click will close the browser (e.g. in the case of HTML popups).

As you can see from the stack trace the Click event occurs fine and I see the browser transition to the new page. It fails when executing the command to refresh the DOM (RefreshDom).

I will check which version of webAii we're using and try out the latest.

Cheers,
Matt
0
macon
Top achievements
Rank 1
answered on 25 May 2010, 09:50 AM
Can you advise where I can get the latest version of WebAii Framework. The link in the last response does not work and I have tried to find it on web but not much luck.

Thanks
Matt
0
macon
Top achievements
Rank 1
answered on 25 May 2010, 11:19 AM
I found the latest version (2010.1.5.18) but unfortunately we still get the same error. I've found a workaround that avoids this scenario but it would be good to hear if anyone has a solution.

Thanks,
Matt
0
Missing User
answered on 25 May 2010, 08:43 PM
Hello again matt,

Thanks for the clarification, I'll try to repro this and to see what might be causing this. If possible, please let us know if you could post your page code that does the sequence in question or if you know of any publically available sitest that do something similar.

All the best,
Nelson
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
General Discussions
Asked by
macon
Top achievements
Rank 1
Answers by
Missing User
macon
Top achievements
Rank 1
Share this question
or