public ElementTag(string tagName, string inputTypes) { TagName = tagName; IsInputElement = ElementFinder.isInputElement(tagName); // Check arguments if (IsInputElement) { if (UtilityClass.IsNullOrEmpty(inputTypes)) { throw new ArgumentNullException("inputTypes", String.Format("inputTypes must be set when tagName is '{0}'", tagName)); } InputTypes = inputTypes.ToLower(); } }
/// <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); }
public Span(DomContainer ie, ElementFinder finder) : base(ie, finder) { }
/// <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="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="CheckBoxCollection"/> class. /// Mainly used by WatiN internally. /// </summary> /// <param name="domContainer">The DOM container.</param> /// <param name="finder">The finder.</param> public CheckBoxCollection(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)) { }
public ElementsContainer(DomContainer ie, ElementFinder finder) : base(ie, finder) { }
public TextField(DomContainer ie, ElementFinder finder) : base(ie, finder) { }
/// <summary> /// Initializes a new instance of the <see cref="CheckBox"/> class. /// Mainly used by WatiN internally. /// </summary> /// <param name="domContainer">The domContainer.</param> /// <param name="finder">The finder.</param> public CheckBox(DomContainer domContainer, ElementFinder finder) : base(domContainer, finder) { }
/// <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(); }
/// <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) { }
private void init(DomContainer domContainer, object element, ElementFinder elementFinder) { this.domContainer = domContainer; this.element = element; this.elementFinder = elementFinder; }
/// <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) { }
public RadioCheck(DomContainer ie, ElementFinder finder) : base(ie, finder) { }
public RadioButton(DomContainer ie, ElementFinder finder) : base(ie, finder) { }
/// <summary> /// Gets the specified Button by using the given <see cref="Attribute" /> to find the Button. /// <seealso cref="Find" /> /// </summary> /// <param name="findBy">The <see cref="Attribute"/> class or one of it's subclasses to find an element by. The <see cref="Find" /> class provides factory methodes to create specialized instances.</param> /// <exception cref="ElementNotFoundException">Thrown if the given <paramref name="findBy"/> doesn't match an element in the webpage.</exception> /// <example> /// This example opens a webpage, types some text and submits it by clicking /// the submit button. /// <code> /// using WatiN.Core; /// /// namespace NewIEExample /// { /// public class WatiNWebsite /// { /// public WatiNWebsite() /// { /// IE ie = new IE("http://www.example.net"); /// Id textFieldId = new Id("textFieldComment"); /// ie.TextField(textFieldId).TypeText("This is a comment to submit"); /// ie.Button(Find.ByText("Submit")).Click; /// ie.Close; /// } /// } /// } /// </code> /// </example> public Button Button(Attribute findBy) { return(new Button(DomContainer, ElementFinder.ButtonFinder(findBy, this))); }