public FrameCollection(DomContainer ie, IHTMLDocument2 htmlDocument) { AllFramesProcessor processor = new AllFramesProcessor(ie, (HTMLDocument)htmlDocument); NativeMethods.EnumIWebBrowser2Interfaces(processor); elements = processor.elements; }
/// <summary> /// Initializes a new instance of the <see cref="Document"/> class. /// Mainly used by WatiN internally. /// </summary> /// <param name="domContainer">The DOM container.</param> /// <param name="htmlDocument">The HTML document.</param> public Document(DomContainer domContainer, IHTMLDocument2 htmlDocument) { ArgumentRequired(domContainer, "domContainer"); ArgumentRequired(htmlDocument, "htmlDocument"); DomContainer = domContainer; this.htmlDocument = htmlDocument; }
/// <summary> /// Initializes a new instance of the <see cref="RadioButtonCollection"/> class. /// Mainly used by WatiN internally. /// </summary> /// <param name="domContainer">The DOM container.</param> /// <param name="finder">The finder.</param> public RadioButtonCollection(DomContainer domContainer, ElementFinder finder) : base(domContainer, finder, new CreateElementInstance(New)) { }
/// <summary> /// Initializes a new instance of the <see cref="SelectListCollection"/> class. /// Mainly used by WatiN internally. /// </summary> /// <param name="domContainer">The DOM container.</param> /// <param name="finder">The finder.</param> public SelectListCollection(DomContainer domContainer, ElementFinder finder) : base(domContainer, finder, new CreateElementInstance(New)) { }
/// <summary> /// Initializes a new instance of the <see cref="Div"/> class. /// Mainly used by WatiN internally. /// </summary> /// <param name="domContainer">The DOM container.</param> /// <param name="htmlDivElement">The HTML div element.</param> public Div(DomContainer domContainer, IHTMLDivElement htmlDivElement) : base(domContainer, (IHTMLElement)htmlDivElement) { }
/// <summary> /// Returns an instance of a SelectList object. /// Mainly used internally. /// </summary> /// <param name="ie">The <see cref="DomContainer"/> the element is in.</param> /// <param name="finder">The element finder to use.</param> public SelectList(DomContainer ie, ElementFinder finder) : base(ie, finder) { //Focus(); }
private void WaitWhileMainDocumentNotAvailable(DomContainer domContainer) { IHTMLDocument2 document = null; while (document == null) { try { document = domContainer.HtmlDocument; } catch { } document = IsDocumentAvailable(document, "maindocument"); } }
public Span(DomContainer ie, IHTMLSpanElement htmlSpanElement) : base(ie, (IHTMLElement) htmlSpanElement) { }
public ElementsContainer(DomContainer ie, ElementFinder finder) : base(ie, finder) { }
private static Element New(DomContainer domContainer, IHTMLElement element) { return new RadioButton(domContainer, (IHTMLInputElement)element); }
public RadioButton(DomContainer ie, IHTMLInputElement inputElement) : base(ie, inputElement) { }
private static Element New(DomContainer domContainer, IHTMLElement element) { return(new Option(domContainer, (IHTMLOptionElement)element)); }
private static Element New(DomContainer domContainer, IHTMLElement element) { return(new Button(domContainer, element)); }
/// <summary> /// Initializes a new instance of the <see cref="Option"/> class. /// </summary> /// <param name="ie">The ie.</param> /// <param name="finder">The finder.</param> public Option(DomContainer ie, ElementFinder finder) : base(ie, finder) { }
/// <summary> /// Initializes a new instance of the <see cref="Option"/> class. /// </summary> /// <param name="ie">The ie.</param> /// <param name="optionElement">The option element.</param> public Option(DomContainer ie, IHTMLOptionElement optionElement) : base(ie, optionElement) { }
private void init(DomContainer domContainer, object element, ElementFinder elementFinder) { this.domContainer = domContainer; this.element = element; this.elementFinder = elementFinder; }
/// <summary> /// This constructor is mainly used from within WatiN. /// </summary> /// <param name="domContainer"><see cref="DomContainer"/> this element is located in</param> /// <param name="elementFinder">The element finder.</param> public Element(DomContainer domContainer, ElementFinder elementFinder) { init(domContainer, null, elementFinder); }
/// <summary> /// This constructor is mainly used from within WatiN. /// </summary> /// <param name="domContainer"><see cref="DomContainer" /> this element is located in</param> /// <param name="element">The element</param> public Element(DomContainer domContainer, object element) { init(domContainer, element, null); }
/// <summary> /// Initializes a new instance of the <see cref="ButtonCollection"/> class. /// Mainly used by WatiN internally. /// </summary> /// <param name="domContainer">The DOM container.</param> /// <param name="finder">The finder.</param> /// <param name="createElementInstance">The create element instance.</param> public BaseElementCollection(DomContainer domContainer, ElementFinder finder, CreateElementInstance createElementInstance) : this(domContainer, (ArrayList)null, createElementInstance) { this.finder = finder; }
/// <summary> /// Initializes a new instance of the <see cref="DivCollection"/> class. /// Mainly used by WatiN internally. /// </summary> /// <param name="domContainer">The DOM container.</param> /// <param name="finder">The finder.</param> public DivCollection(DomContainer domContainer, ElementFinder finder) : base(domContainer, finder, new CreateElementInstance(New)) { }
public RadioCheck(DomContainer ie, IHTMLInputElement inputElement) : base(ie, (IHTMLElement) inputElement) { }
/// <summary> /// Initializes a new instance of the <see cref="DivCollection"/> class. /// Mainly used by WatiN internally. /// </summary> /// <param name="domContainer">The DOM container.</param> /// <param name="elements">The elements.</param> public DivCollection(DomContainer domContainer, ArrayList elements) : base(domContainer, elements, new CreateElementInstance(New)) { }
/// <summary> /// Initializes a new instance of the <see cref="Div"/> class. /// Mainly used by WatiN internally. /// </summary> /// <param name="domContainer">The DOM container.</param> /// <param name="finder">The HTML div element.</param> public Div(DomContainer domContainer, ElementFinder finder) : base(domContainer, finder) { }
private static Element New(DomContainer domContainer, IHTMLElement element) { return(new Div(domContainer, (IHTMLDivElement)element)); }
/// <summary> /// Returns an initialized instance of a SelectList object. /// Mainly used by the collectionclass SelectLists. /// </summary> /// <param name="ie">The <see cref="DomContainer"/> the element is in.</param> /// <param name="htmlSelectElement">The HTML select element.</param> public SelectList(DomContainer ie, IHTMLElement htmlSelectElement) : base(ie, htmlSelectElement) { //Focus(); }
/// <summary> /// This constructor will mainly be used by the constructor of FrameCollection /// to create an instance of a Frame. /// </summary> /// <param name="ie"></param> /// <param name="htmlDocument"></param> /// <param name="name"></param> /// <param name="id"></param> public Frame(DomContainer ie, IHTMLDocument2 htmlDocument, string name, string id) : base(ie, htmlDocument) { Init(name, id); }
private static Element New(DomContainer domContainer, IHTMLElement element) { return new Span(domContainer, (IHTMLSpanElement)element); }
public TextField(DomContainer ie, IHTMLElement element) : base(ie, element) { }
private static Element New(DomContainer domContainer, IHTMLElement element) { return new SelectList(domContainer, element); }
public TextField(DomContainer ie, ElementFinder finder) : base(ie, finder) { }
internal static Element GetTypedElement(DomContainer domContainer, IHTMLElement element) { Assembly assembly = Assembly.Load("ItiN"); Element returnElement = new ElementsContainer(domContainer, element); foreach (Type type in assembly.GetTypes()) { if (type.IsSubclassOf(typeof(Element))) { PropertyInfo property = type.GetProperty("ElementTags"); if (property != null) { ArrayList elementTags = (ArrayList)property.GetValue(type, null); if (ElementTag.IsValidElement(element, elementTags)) { ConstructorInfo constructor = type.GetConstructor(new Type[] { typeof(Element) }); if (constructor != null) { returnElement = (Element)constructor.Invoke(new object[] { returnElement }); break; } } } } } return returnElement; }
/// <summary> /// Initializes a new instance of the <see cref="RadioButtonCollection"/> class. /// Mainly used by WatiN internally. /// </summary> /// <param name="domContainer">The DOM container.</param> /// <param name="elements">The elements.</param> public RadioButtonCollection(DomContainer domContainer, ArrayList elements) : base(domContainer, elements, new CreateElementInstance(New)) { }
/// <exclude /> public Enumerator(DomContainer domContainer, ArrayList children, CreateElementInstance createElementInstance) { this.children = children; this.domContainer = domContainer; this.createElementInstance = createElementInstance; Reset(); }
/// <summary> /// Initializes a new instance of the <see cref="ButtonCollection"/> class. /// Mainly used by WatiN internally. /// </summary> /// <param name="domContainer">The DOM container.</param> /// <param name="elements">The elements.</param> /// <param name="createElementInstance">The create element instance.</param> public BaseElementCollection(DomContainer domContainer, ArrayList elements, CreateElementInstance createElementInstance) { this.elements = elements; this.domContainer = domContainer; this.createElementInstance = createElementInstance; }
public RadioButton(DomContainer ie, ElementFinder finder) : base(ie, finder) { }
private static Element New(DomContainer domContainer, IHTMLElement element) { return new Div(domContainer, (IHTMLDivElement)element); }
public RadioCheck(DomContainer ie, ElementFinder finder) : base(ie, finder) { }
public ElementsContainer(DomContainer ie, object element) : base(ie, element) { }
public Span(DomContainer ie, ElementFinder finder) : base(ie, finder) { }