public static CssSelectorConstraint FindByCss(DomContainer domContainer, string cssSelector) { string cssMarker = "findByCssMarker" + ++_cssMarkerIndex; var constraint = new CssSelectorConstraint(new ScriptLoader(), domContainer); constraint.Initialize(cssSelector, cssMarker); return constraint; }
public static Element GetDefaultReturnElement(DomContainer domContainer, INativeElement ieNativeElement) { #if NET11 return new ElementsContainer(domContainer, ieNativeElement); #else return new ElementsContainer<Element>(domContainer, ieNativeElement); #endif }
public static Element Element(DomContainer domContainer, BaseConstraint findBy, IElementCollection elements) { #if NET11 return new ElementsContainer(domContainer, domContainer.NativeBrowser.CreateElementFinder(null, findBy, elements)); #else return new ElementsContainer<Element>(domContainer, domContainer.NativeBrowser.CreateElementFinder(null, findBy, elements)); #endif }
public FrameCollection(DomContainer domContainer, IHTMLDocument2 htmlDocument) { AllFramesProcessor processor = new AllFramesProcessor(domContainer, (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> /// This constructor will mainly be used by the constructor of FrameCollection /// to create an instance of a Frame. /// </summary> /// <param name="domContainer">The domContainer</param> /// <param name="frameDocument">The document within the frame</param> public Frame(DomContainer domContainer, INativeDocument frameDocument) : base(domContainer) { if (frameDocument == null) throw new ArgumentNullException("frameDocument"); _frameDocument = frameDocument; _frameElement = new Element(domContainer, frameDocument.ContainingFrameElement); }
public static Element Element(DomContainer domContainer, string tagname, BaseConstraint findBy, IElementCollection elements, params string[] inputtypes) { string inputtypesString = UtilityClass.StringArrayToString(inputtypes, ","); #if NET11 return new ElementsContainer(domContainer, domContainer.NativeBrowser.CreateElementFinder(tagname, inputtypesString, findBy, elements)); #else return new ElementsContainer<Element>(domContainer, domContainer.NativeBrowser.CreateElementFinder(tagname, inputtypesString, findBy, elements)); #endif }
/// <summary> /// This constructor will mainly be used by the constructor of FrameCollection /// to create an instance of a Frame. /// </summary> /// <param name="domContainer">The domContainer</param> /// <param name="frameDocument">The document within the frame</param> /// <param name="parentDocument"> </param> public Frame(DomContainer domContainer, INativeDocument frameDocument, Frame parentDocument) : base(domContainer) { if (frameDocument == null) throw new ArgumentNullException("frameDocument"); _frameDocument = frameDocument; FrameElement = CreateFrameElement(domContainer, frameDocument); SetFrameHierarchy(parentDocument, frameDocument); }
/// <summary> /// Creates an element finder. /// </summary> /// <param name="domContainer">The DOM container</param> /// <param name="factory">The factory to get the element(s) to search in</param> /// <param name="elementTags">The element tags considered by the finder, or null if all tags considered</param> /// <param name="constraint">The constraint used by the finder to filter elements, or null if no additional constraint</param> public NativeElementFinder(NativeElementCollectionFactory factory, DomContainer domContainer, IList<ElementTag> elementTags, Constraint constraint) : base(elementTags, constraint) { if (factory == null) throw new ArgumentNullException("factory"); if (domContainer == null) throw new ArgumentNullException("domContainer"); this.factory = factory; this.domContainer = domContainer; }
public AllFramesProcessor(DomContainer domContainer, HTMLDocument htmlDocument) { elements = new ArrayList(); frameElements = (IHTMLElementCollection) htmlDocument.all.tags(ElementsSupport.FrameTagName); // If the current document doesn't contain FRAME elements, it then // might contain IFRAME elements. if (frameElements.length == 0) { frameElements = (IHTMLElementCollection) htmlDocument.all.tags("IFRAME"); } this._domContainer = domContainer; this.htmlDocument = htmlDocument; }
public static Element CreateTypedElement(DomContainer domContainer, INativeElement ieNativeElement) { if (ieNativeElement == null) return null; if (_elementConstructors == null) { _elementConstructors = CreateElementConstructorHashTable(); } ElementTag elementTag = new ElementTag(ieNativeElement); Element returnElement = GetDefaultReturnElement(domContainer, ieNativeElement); if (_elementConstructors.Contains(elementTag)) { ConstructorInfo constructorInfo = (ConstructorInfo)_elementConstructors[elementTag]; return (Element)constructorInfo.Invoke(new object[] { returnElement }); } return returnElement; }
public static TextField TextField(DomContainer domContainer, BaseConstraint findBy, IElementCollection elements) { return new TextField(domContainer, domContainer.NativeBrowser.CreateElementFinder(Core.TextField.ElementTags, findBy, elements)); }
public static SpanCollection Spans(DomContainer domContainer, IElementCollection elements) { return new SpanCollection(domContainer, domContainer.NativeBrowser.CreateElementFinder(Core.Span.ElementTags, elements)); }
public static SelectList SelectList(DomContainer domContainer, BaseConstraint findBy, IElementCollection elements) { return new SelectList(domContainer, domContainer.NativeBrowser.CreateElementFinder(Core.SelectList.ElementTags, findBy, elements)); }
public static TableBody TableBody(DomContainer domContainer, BaseConstraint findBy, IElementCollection elements) { return new TableBody(domContainer, domContainer.NativeBrowser.CreateElementFinder(Core.TableBody.ElementTags, findBy, elements)); }
/// <summary> /// Initializes a new instance of the <see cref="ListItem"/> class. /// Mainly used by WatiN internally. /// </summary> /// <param name="domContainer">The DOM container.</param> /// <param name="nativeElement">The HTML li element.</param> public ListItem(DomContainer domContainer, INativeElement nativeElement) : base(domContainer, nativeElement) { }
internal new static Element New(DomContainer domContainer, IHTMLElement element) { return(new Form(domContainer, (IHTMLFormElement)element)); }
public Label(DomContainer domContainer, INativeElement labelElement) : base(domContainer, labelElement) { }
public static CheckBox CheckBox(DomContainer domContainer, BaseConstraint findBy, IElementCollection elements) { return new CheckBox(domContainer, domContainer.NativeBrowser.CreateElementFinder(Core.CheckBox.ElementTags, findBy, elements)); }
public Para(DomContainer domContainer, INativeElement htmlParaElement) : base(domContainer, htmlParaElement) { }
public static Element CreateFrameElement(DomContainer domContainer, INativeDocument frameDocument) { return(new Element(domContainer, frameDocument.ContainingFrameElement)); }
public TextField(DomContainer domContainer, ElementFinder finder) : base(domContainer, finder) { }
public TextField(DomContainer domContainer, INativeElement element) : base(domContainer, element) { }
public Form(DomContainer domContainer, IHTMLFormElement htmlFormElement) : base(domContainer, domContainer.NativeBrowser.CreateElement(htmlFormElement)) { }
public static ImageCollection Images(DomContainer domContainer, IElementCollection elements) { return new ImageCollection(domContainer, domContainer.NativeBrowser.CreateElementFinder(Core.Image.ElementTags, elements)); }
public Label(DomContainer domContainer, ElementFinder finder) : base(domContainer, finder) { }
public static AreaCollection Areas(DomContainer domContainer, IElementCollection elements) { return new AreaCollection(domContainer, domContainer.NativeBrowser.CreateElementFinder(Core.Area.ElementTags, elements)); }
/// <summary> /// Returns an initialized instance of a SelectList object. /// Mainly used by the collectionclass SelectLists. /// </summary> /// <param name="domContainer">The <see cref="DomContainer"/> the element is in.</param> /// <param name="element">The HTML select element.</param> public SelectList(DomContainer domContainer, IHTMLElement element) : base(domContainer, domContainer.NativeBrowser.CreateElement(element)) { }
public TableBody(DomContainer domContainer, INativeElement element) : base(domContainer, element) { }
/// <summary> /// Initializes a new instance of the <see cref="ParaCollection"/> class. /// Mainly used by WatiN internally. /// </summary> /// <param name="domContainer">The DOM container.</param> /// <param name="finder">The finder.</param> public ParaCollection(DomContainer domContainer, INativeElementFinder finder) : base(domContainer, finder, new CreateElementInstance(Para.New)) { }
internal new static Element New(DomContainer domContainer, IHTMLElement element) { return(new SelectList(domContainer, element)); }
/// <summary> /// Initializes a new instance of the <see cref="ParaCollection"/> class. /// Mainly used by WatiN internally. /// </summary> /// <param name="domContainer">The DOM container.</param> /// <param name="elements">The elements.</param> public ParaCollection(DomContainer domContainer, ArrayList elements) : base(domContainer, elements, new CreateElementInstance(Para.New)) { }
public RadioCheck(DomContainer domContainer, INativeElement element) : base(domContainer, element) { }
/// <summary> /// Initializes a new instance of the <see cref="ListItem"/> class. /// Mainly used by WatiN internally. /// </summary> /// <param name="domContainer">The DOM container.</param> /// <param name="finder">The HTML li element.</param> public ListItem(DomContainer domContainer, ElementFinder finder) : base(domContainer, finder) { }
public Element(DomContainer domContainer, ElementFinder elementFinder) : base(domContainer, elementFinder) { }
public RadioCheck(DomContainer domContainer, ElementFinder finder) : base(domContainer, finder) { }
public Element(DomContainer domContainer, INativeElement nativeElement) : base(domContainer, nativeElement) { }
public Form(DomContainer domContainer, INativeElement htmlFormElement) : base(domContainer, htmlFormElement) { }
public static TableCell TableCell(DomContainer domContainer, Regex elementId, int index, IElementCollection elements) { return new TableCell(domContainer, domContainer.NativeBrowser.CreateElementFinder(Core.TableCell.ElementTags, Find.ByIndex(index).And(Find.ById(elementId)), elements)); }
public Form(DomContainer domContainer, ElementFinder finder) : base(domContainer, finder) { }
public static TableBodyCollection TableBodies(DomContainer domContainer, IElementCollection elements) { return new TableBodyCollection(domContainer, domContainer.NativeBrowser.CreateElementFinder(Core.TableBody.ElementTags, elements)); }
/// <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, domContainer.NativeBrowser.CreateElement(htmlDivElement)) { }
public static TextFieldCollection TextFields(DomContainer domContainer, IElementCollection elements) { return new TextFieldCollection(domContainer, domContainer.NativeBrowser.CreateElementFinder(Core.TextField.ElementTags, elements)); }
/// <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, INativeElementFinder finder) : base(domContainer, finder) { }
public static DivCollection Divs(DomContainer domContainer, IElementCollection elements) { return new DivCollection(domContainer, domContainer.NativeBrowser.CreateElementFinder(Core.Div.ElementTags, elements)); }
public static ElementCollection Elements(DomContainer domContainer, IElementCollection elements) { return new ElementCollection(domContainer, domContainer.NativeBrowser.CreateElementFinder(null, elements)); }
public static Area Area(DomContainer domContainer, BaseConstraint findBy, IElementCollection elements) { return new Area(domContainer, domContainer.NativeBrowser.CreateElementFinder(Core.Area.ElementTags, findBy, elements)); }
public static FileUploadCollection FileUploads(DomContainer domContainer, IElementCollection elements) { return new FileUploadCollection(domContainer, domContainer.NativeBrowser.CreateElementFinder(Core.FileUpload.ElementTags, elements)); }
public static ButtonCollection Buttons(DomContainer domContainer, IElementCollection elements) { return new ButtonCollection(domContainer, domContainer.NativeBrowser.CreateElementFinder(Core.Button.ElementTags, elements)); }
public TextFieldExtended(DomContainer domContainer, INativeElement element) : base(domContainer, element) { }
public static CheckBoxCollection CheckBoxes(DomContainer domContainer, IElementCollection elements) { return new CheckBoxCollection(domContainer, domContainer.NativeBrowser.CreateElementFinder(Core.CheckBox.ElementTags, elements)); }
public TableBody(DomContainer domContainer, ElementFinder finder) : base(domContainer, finder) { }
internal new static Element New(DomContainer domContainer, IHTMLElement element) { return(new Div(domContainer, (IHTMLDivElement)element)); }
/// <summary> /// Returns an instance of a SelectList object. /// Mainly used internally. /// </summary> /// <param name="domContainer">The <see cref="DomContainer"/> the element is in.</param> /// <param name="finder">The element finder to use.</param> public SelectList(DomContainer domContainer, INativeElementFinder finder) : base(domContainer, finder) { }
public static FileUpload FileUpload(DomContainer domContainer, BaseConstraint findBy, IElementCollection elements) { return new FileUpload(domContainer, domContainer.NativeBrowser.CreateElementFinder(Core.FileUpload.ElementTags, findBy, elements)); }
/// <summary> /// Initialises a new instance of the <see cref="Button"/> class. /// Mainly used by WatiN internally. /// </summary> /// <param name="domContainer">The <see cref="DomContainer" /> the element is in.</param> /// <param name="element">The input button or button element.</param> public Button(DomContainer domContainer, INativeElement element) : base(domContainer, element) { }
/// <summary> /// Initialises a new instance of the <see cref="Button"/> class. /// Mainly used by WatiN internally. /// </summary> /// <param name="domContainer">The <see cref="DomContainer" /> the element is in.</param> /// <param name="finder">The input button or button element.</param> public Button(DomContainer domContainer, ElementFinder finder) : base(domContainer, finder) { }
public StaticElementFinder(DomContainer domcontainer, INativeElement nativeElement) : base(CreateTagList(nativeElement), Find.First()) { _domContainer = domcontainer; _nativeElement = nativeElement; }
public TextFieldExtended(DomContainer domContainer, ElementFinder finder) : base(domContainer, finder) { }
internal new static Element New(DomContainer domContainer, IHTMLElement element) { return(new RadioButton(domContainer, (IHTMLInputElement)element)); }