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

Frames collection empty

16 Answers 116 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jean-Pascal van der Endt
Top achievements
Rank 1
Jean-Pascal van der Endt asked on 05 Aug 2011, 03:15 PM
Hi Telerik support,

I found a problem in the latest WebAii (as far as I can tell) which I'd like to report. One of our customers has a web page with this very clean and valid HTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<frameset cols="*">
<frame name="topFrame" id="topFrame" src="test.html" frameborder="0" scrolling="auto" style="overflow-x: hidden">
</frameset>
</html>

After loading this page in a browser (IE8 or IE9) (i.e. after browser.NavigateTo), the browser.Frames collection is empty, which is unexpected.

browser.RefreshDomTree doesn't help (returns false in fact), and browser.Refresh() (which I don't really want to do as it influences my test) usually doesn't help, but occasionally it does and browser.Frames contains one frame (as expected).

As far as I know, this problem doesn't occur (as frequently) in Telerik Testing Framework 2010.1, but I can reproduce it 100% of the time in 2011.1.

I know that the setup of such a page isn't very useful, but the content of the page is beyond my control, and I do need to test the correctness of the page. Similar pages from other customers behave in the same way. This is turning into a big problem for us, so I hope you can try to figure it out and provide a solution. Thanks guys, I appreciate it.

16 Answers, 1 is accepted

Sort by
0
Anthony
Telerik team
answered on 05 Aug 2011, 09:30 PM
Hello Jean-Pascal,

Thank you for the HTML code. I reproduced the issue and filed a bug for it. You can find track the PITS Issue here: Public URL.

Greetings,
Anthony
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
0
Jean-Pascal van der Endt
Top achievements
Rank 1
answered on 06 Aug 2011, 10:26 AM
Hi Anthony,

Thanks for reproducing the problem and following up. I'm looking forward to seeing a fix soon. Any chance of having a fix in a publicly available internal build?

Regards,
JP
0
Anthony
Telerik team
answered on 08 Aug 2011, 03:32 PM
Hello Jean-Pascal,

Yes, as soon as the fix is implemented it will be included in the following internal build. I can't give you a specific version number or date, however, until the assigned developer gets to the bottom of the issue.

All the best,
Anthony
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
0
Jean-Pascal van der Endt
Top achievements
Rank 1
answered on 10 Aug 2011, 02:20 PM
Hello Anthony,

Thanks for that, I appreciate it. Not to hassle you or the development team, but can you check whether someone is working on this? (the PITS issue doesn't give any update).

This problem is currently preventing us from going forward, and I need to decide whether to wait (and I have no idea how long) or to rollback to a version from early last year. Any info you can give me, will be helpful for our own dev planning, thanks.

Regards,

JP
0
Anthony
Telerik team
answered on 11 Aug 2011, 05:27 PM
Hi Jean-Pascal,

It turns out I wasn't accessing the frame correctly in my test. Here is my revised code which works:

Manager.LaunchNewBrowser(BrowserType.InternetExplorer);
ActiveBrowser.NavigateTo("c:\\html\\frame.html");           
 
ArtOfTest.WebAii.Core.Browser myFrame = ActiveBrowser.Frames["topFrame"];
myFrame.RefreshDomTree();
 
Element e = myFrame.Find.ById("CFC");
myFrame.Actions.Click(e);

I had to refresh the frame's DOM tree first, and then go through the frame to find the element and click on it. Let me know if you continue to have difficulty after modifying your code.

All the best,
Anthony
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
0
Jean-Pascal van der Endt
Top achievements
Rank 1
answered on 11 Aug 2011, 08:23 PM
Hello Anthony,

Thank you for looking into it. I'm doing pretty much the same thing you're doing, but your code helped me to realize what is causing the problem. I have no idea why though, so that would be the next step of figuring this out :)

Recently I started launching the browser in this way:

Manager.LaunchNewBrowser(BrowserType.InternetExplorer, true, ProcessWindowStyle.Minimized);

The problem is in the last parameter, the ProcessWindowStyle. I want to start the browser as a minimized window, because in some cases that speeds up my tests. Some web pages display animated images or Flash movies, and those animated elements slow down our tests considerably. When the browser is minimized, no processing power is lost on doing the animation.

However, it turns out that running a minimized browser causes the ActiveBrowser.Frames collection to be empty (i.e. zero elements). I have no clue as to why these two things are related, but they are. If I switch back to ProcessWindowStyle.Normal, the frames collection is loaded correctly.

I hope that you guys can figure this one out :) Thanks for your continuing support, we appreciate it.

Regards,
Jean-Pascal
0
Anthony
Telerik team
answered on 11 Aug 2011, 10:53 PM
Hello Jean-Pascal,

I added that extra piece to my code and Visual Studio corrected it to this:

Manager.LaunchNewBrowser(BrowserType.InternetExplorer, true, System.Diagnostics.ProcessWindowStyle.Minimized);

The test passed with IE minimized, so I am not experiencing your issue. Please provide a means of local reproduction so I can see the issue first-hand.

Greetings,
Anthony
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
0
Jean-Pascal van der Endt
Top achievements
Rank 1
answered on 12 Aug 2011, 10:25 AM
Hello Anthony,

I've sent a small test project to support@telerik.com which reproduces the problem (in my environment anyway). I hope it helps you to reproduce the problem as well.

Kind regards,
Jean-Pascal
0
Anthony
Telerik team
answered on 15 Aug 2011, 05:38 PM
Hello Jean-Pascal,

I tested this on a VM running Test Studio 2011.1.809 (Framework only) and finally saw the issue. What's strange is than it worked and returned 1 frame when set to either Normal or Minimized on my local machine with full Test Studio installed. So it seems there is something specific about the Framework only version that is causing this. You can track the PITS Issue here: Public URL.

Greetings,
Anthony
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
0
Jean-Pascal van der Endt
Top achievements
Rank 1
answered on 16 Aug 2011, 11:06 AM
Thanks Anthony, for your efforts in reproducing the issue. I'm looking forward to a solution :)

Regards,

JP
0
Jean-Pascal van der Endt
Top achievements
Rank 1
answered on 30 Aug 2011, 03:37 PM
Hello Anthony,

I hope you are doing well. I've been monitoring the PITS issue, but I suspect that there hasn't been much activity for this item. Can you perhaps check with the development team?

I discovered a different, but similar issue, which may help to pinpoint the problem. I have a webpage (it's actually one of our customer's webpages, I will email the URL separately in order to protect their identity) which has three IFRAME elements in it, but the current Telerik Framework version only detects one of them (remember I'm using the framework only version).

I did extensive testing with different Telerik framework versions, because I know that this used to work correctly with older versions. I found the following:

- Versions up to and including 2010.2.830 detect the three IFRAMEs correctly.
- Version 2010.3.1208 and later detect only one IFRAME in the same page.

Hopefully this helps to narrow down this new problem - I'm unsure if it's related to my original problem.

Thanks for looking into both of them.

Kind regards,

Jean-Pascal
0
Anthony
Telerik team
answered on 30 Aug 2011, 08:35 PM
Hello Jean-Pascal,

Thank you for the additional information. I added your notes regarding past version numbers to the issue.

To what email did you send the new URL? I tested a sample page with three frames on the 2011.1.829 version of the Framework. All three were detected as long as the browser was not minimized, which points back to the original issue.

Regarding that, the good news is that it was approved to be fixed. The bad news is the priority is low and I cannot guarantee you an estimated fix date. With Test Studio R2 2011 right around the corner, our developers are extremely busy. Unfortunately they have deemed a Framework-only bug with an existing work-around (not to use the Minimized command) to be low priority.

Greetings,
Anthony
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
0
Jean-Pascal van der Endt
Top achievements
Rank 1
answered on 30 Aug 2011, 09:59 PM
Hello Anthony,

I sent the email to support@telerik.com, I can send it again if you want me to.

Thanks for checking and verifying, I appreciate it. I do think that this second problem is a separate thing, which doesn't have the same workaround (i.e. it's somehow parsing the HTML incorrectly). Your devs will have to evaluate that of course, but I hope they will agree, and that it will get a separate priority, since this is a rather breaking change for us, that we can't really get around, afaik.

Thanks again for your support.

Regards,

Jean-Pascal
0
Anthony
Telerik team
answered on 31 Aug 2011, 03:19 PM
Hello Jean-Pascal,

I checked the folder that receives messages sent to that address and did not see your email. Please try again, Alternatively I emailed you a Dropbox link; you can insert a text file there that includes the URL.

If you know of a public site that exhibits the same behavior, you can of course share that here.

All the best,
Anthony
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
0
Anthony
Telerik team
answered on 31 Aug 2011, 05:17 PM
Hi Jean-Pascal,

Thank you again for another precise means of reproduction. You can track the PITS Issue here: Public URL.

Regards,
Anthony
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
0
Cody
Telerik team
answered on 17 Oct 2011, 09:10 PM
Hello Jean-Pascal Van Der Endt,

Our developers have investigated this report and are telling "as designed". The reason is, for performance reasons, we are deliberately skipping iframes which have 0 width and 0 height. This change was made (in the timeframe you identified) because we had another customer report sluggishness with the product. When we investigated it we discovered he was loading about 100+ empty iframes. Once we skipped parsing of the empty iframes the sluggishness went away.

Knowing this can you perform your testing given this expected behavior?

Regards,
Cody
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Jean-Pascal van der Endt
Top achievements
Rank 1
Answers by
Anthony
Telerik team
Jean-Pascal van der Endt
Top achievements
Rank 1
Cody
Telerik team
Share this question
or