ReadyState property
- From: "Matt Adamson" <Adamson_matthew@xxxxxxxxxxx>
- Date: Thu, 11 Jan 2007 09:55:40 -0000
Guys,
I'm writing an IE wrapper object to use in NUnit tests to test our web
application. I've created methods such as WaitForReadyStateToComplete which
take a HTMLDocument object or a InternetExplorer object.
1) I'd like to know the difference between the two ready state properties
2) I also noticed a lot of other IE objects such as HTMLTable and
HTMLTableRow have readyState as a property too. Does it also mean you should
wait until these become complete before accessing them?
My WaitForReadyStateToComplete method looks like the following
Any thoughts would be appreciated
/// <summary>
/// Wait for the ready state of the IE object to change to
/// complete.
/// </summary>
public void WaitForReadyStateToComplete(HTMLDocument htmlDocument)
{
Trace.Indent();
Trace.WriteLineIf( traceSwitch.TraceLevelInfo,
"Waiting for ready state to complete");
while(htmlDocument.readyState != "complete")
{
Trace.WriteLine("Ready state = " + htmlDocument.readyState.ToString());
Thread.Sleep(10);
}
Trace.WriteLineIf( traceSwitch.TraceLevelInfo,
"Ready state complete");
Trace.Unindent();
}
.
- Follow-Ups:
- Re: ReadyState property
- From: Igor Tandetnik
- Re: ReadyState property
- Prev by Date: VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help
- Next by Date: Re: ReadyState property
- Previous by thread: VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help
- Next by thread: Re: ReadyState property
- Index(es):