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”.