protected void Initialize(IHTMLElement e, DocumentElement doc) { _Document = doc; _Element = e; }
public HTMLElement(IHTMLElement e, DocumentElement doc) { Initialize(e, doc); }
public SelectElement(IHTMLSelectElement e, DocumentElement d) : base(e as IHTMLElement, d) { }
public InputElement(IHTMLInputElement e, DocumentElement d) : base(e as IHTMLElement, d) { }
public ButtonElement(IHTMLButtonElement e, DocumentElement d) : base(e as IHTMLElement, d) { }
public FormElement(IHTMLFormElement e, DocumentElement d) : base(e as IHTMLElement, d) { }
public OptionElement(IHTMLOptionElement e, DocumentElement d) : base(e as IHTMLElement, d) { }
public void WaitForNavigationComplete() { if (!_NavigationComplete.WaitOne(Timeout, false)) throw new Exception("Browser navigate timeout: " + ((HTMLDocument)(IE.Document)).url); _Document = new DocumentElement((IHTMLDocument3)(IE.Document), this); }
/// <summary> /// Navigate to a given URL; throw if timeout, return when navigation complete /// </summary> /// <param name="URL"></param> /// <param name="wait">true to wait for completion of navigate</param> /// <returns>Document if wait request AND navigation succeeded</returns> public DocumentElement Navigate(string URL, bool wait) { _Document = null; IE.Navigate(URL, ref Missing, ref Missing, ref Missing, ref Missing); if (wait) { WaitForNavigationComplete(); return Document; } return null; }