WatiN testing of multi-level Frames page

I wanted to use  WatiN Web Application Testing In .Net, to test  html page with multi-level frames:

E.g TopFrame.aspx :
<Frameset>
     <FRAME SRC="ContentFrame.aspx">
</Frameset>

ContentFrame.aspx
<body>
     <IFRAME SRC="SubFrame.aspx">
</body>

When I tried to check ie.Frame("ContentFrame") it didn't show me html of ContentFrame.aspx(as expected), but showed html of parent  TopFrame.aspx. I've attached debug version of WatiN and stepped through to opening page. And in debugger  ie.Frame("ContentFrame")  was populated correctly.

I thought that the problem is with timeout of loading down-level page(SubFrame.aspx in my sample). Unfortunately 
increase of TimeOut didn't help.
I've done a few attempts in debugger and sometimes(when I had breakpoints in IE.CreateNewIEAndGoToUri and DomContainer.WaitWhileMainDocumentNotAvailable) it loaded html of content frame, but mostly showed parent's frameset.
There are some ideas to try in discussions: best way to find if webbrowser is totally ready and Webbrowser Wait!.

I've reported the problem to WatiN bug list 1747471 "Frame is not loaded for page with multi-level frames".

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
posted @ Friday, June 29, 2007 1:39 PM
Print

Comments on this entry:

# re: WatiN testing of multi-level Frames page

Left by Michael Freidgeim at 8/14/2007 11:55 PM
Gravatar
Jeroen,
Thank you very much for your advice.
I've downloaded the latest version of IE.cs from http://watin.svn.sourceforge.net/viewvc/*checkout*/watin/trunk/src/Core/IE.cs?revision=446
and with createInNewProcess=true it works fine.

# re: WatiN testing of multi-level Frames page

Left by FTorres at 9/8/2007 3:34 AM
Gravatar
I would be curious to see how InCIsif.net would react to the problem.
<IFRAME> are sometime problematic.

# re: WatiN testing of multi-level Frames page

Left by diegoeche at 4/7/2008 8:34 AM
Gravatar
I dont know if it's the same. I tried to get a button that was in an inner IFrame and Watin didnt find it. What i did was that looked for the IFrame Element and then got the DOM from it. And problem solved.

# re: WatiN testing of multi-level Frames page

Left by Wally at 5/6/2008 1:14 PM
Gravatar
Hi diegoeche, could you post an example of the code you used?

# re: WatiN testing of multi-level Frames page

Left by Michael Freidgeim at 5/7/2008 5:48 PM
Gravatar
Wally,
Below is the example of using normal Frame.
IFrame , I hope, will be similar.
Frame mainFrame = ie.Frame("mainframe");
Button btnLogoff = mainFrame.Button(Find.ByName("ContentView$PageLayout$BottomNav$btnLogoff"));

# re: WatiN testing of multi-level Frames page

Left by kavitha at 11/8/2010 5:22 AM
Gravatar
Frame frame1 = browser.Frame(Find.ByName("frame1Name"));
Frame frame2 = frame1.Frame(Find.ByClass("XXXX"));
frame2.TextField(Find.ById("textboxid")).Value = "some value";

Your comment:



(not displayed)


 
 
 
 
 

Live Comment Preview:

 
«February»
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910