Search Results for

    Show / Hide Table of Contents

    Class WebElementWrapper

    Defines an element wrapper for a .

    Inheritance
    System.Object
    WebElementWrapper
    Button
    CheckBox
    FileInput
    Form
    Image
    List
    Option
    Select
    Table
    TableRow
    TextInput
    Implements
    IElementWrapper<RemoteWebElement>
    Namespace: Legerity.Web.Elements
    Assembly: Legerity.Web.dll
    Syntax
    public class WebElementWrapper : object, IElementWrapper<RemoteWebElement>

    Constructors

    | Improve this Doc View Source

    WebElementWrapper(IWebElement)

    Initializes a new instance of the WebElementWrapper class.

    Declaration
    public WebElementWrapper(IWebElement element)
    Parameters
    Type Name Description
    IWebElement element

    The reference.

    | Improve this Doc View Source

    WebElementWrapper(RemoteWebElement)

    Initializes a new instance of the WebElementWrapper class.

    Declaration
    public WebElementWrapper(RemoteWebElement element)
    Parameters
    Type Name Description
    RemoteWebElement element

    The reference.

    Properties

    | Improve this Doc View Source

    Driver

    Gets the instance of the driver for the web application.

    Declaration
    public RemoteWebDriver Driver { get; }
    Property Value
    Type Description
    RemoteWebDriver
    | Improve this Doc View Source

    Element

    Gets the original reference object.

    Declaration
    public RemoteWebElement Element { get; }
    Property Value
    Type Description
    RemoteWebElement
    | Improve this Doc View Source

    ElementDriver

    Gets the driver used to find this element.

    Declaration
    public IWebDriver ElementDriver { get; }
    Property Value
    Type Description
    IWebDriver
    | Improve this Doc View Source

    IsEnabled

    Gets a value indicating whether the element is enabled.

    Declaration
    public virtual bool IsEnabled { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsVisible

    Gets a value indicating whether the element is visible.

    Declaration
    public virtual bool IsVisible { get; }
    Property Value
    Type Description
    System.Boolean

    Methods

    | Improve this Doc View Source

    Click()

    Clicks the element.

    Declaration
    public virtual void Click()
    | Improve this Doc View Source

    FindElement(By)

    Finds a child element by the specified locator.

    Declaration
    public RemoteWebElement FindElement(By locator)
    Parameters
    Type Name Description
    By locator

    The locator to find a child element by.

    Returns
    Type Description
    RemoteWebElement

    The .

    | Improve this Doc View Source

    FindElements(By)

    Finds a collection of child elements by the specified locator.

    Declaration
    public ReadOnlyCollection<RemoteWebElement> FindElements(By locator)
    Parameters
    Type Name Description
    By locator

    The locator to find a child element by.

    Returns
    Type Description
    ReadOnlyCollection<RemoteWebElement>

    The readonly collection of .

    | Improve this Doc View Source

    GetAttribute(String)

    Gets the value of the specified attribute for this element.

    Declaration
    public string GetAttribute(string attributeName)
    Parameters
    Type Name Description
    System.String attributeName

    The name of the attribute.

    Returns
    Type Description
    System.String

    The attribute's current value if it exists; otherwise, null.

    | Improve this Doc View Source

    VerifyElementNotShown(By)

    Determines whether the given element is not shown.

    Declaration
    public void VerifyElementNotShown(By locator)
    Parameters
    Type Name Description
    By locator

    The locator for the element to locate.

    | Improve this Doc View Source

    VerifyElementShown(By)

    Determines whether the given element is shown.

    Declaration
    public void VerifyElementShown(By locator)
    Parameters
    Type Name Description
    By locator

    The locator for the element to find.

    Exceptions
    Type Condition
    ElementNotShownException

    Thrown when the element is not shown.

    | Improve this Doc View Source

    VerifyElementShown(By, Nullable<TimeSpan>)

    Determines whether the specified element is shown with the specified timeout.

    Declaration
    public void VerifyElementShown(By locator, TimeSpan? timeout)
    Parameters
    Type Name Description
    By locator

    The locator to find a specific element.

    System.Nullable<TimeSpan> timeout

    The amount of time the driver should wait when searching for the locator if it is not immediately present.

    Exceptions
    Type Condition
    ElementNotShownException

    Thrown when the element is not shown.

    | Improve this Doc View Source

    VerifyElementsShown(By)

    Determines whether the specified elements are shown.

    Declaration
    public void VerifyElementsShown(By locator)
    Parameters
    Type Name Description
    By locator

    The locator for the element to find.

    Exceptions
    Type Condition
    ElementsNotShownException

    Thrown when no elements are shown for the expected locator.

    | Improve this Doc View Source

    VerifyElementsShown(By, Nullable<TimeSpan>)

    Determines whether the specified elements are shown with the specified timeout.

    Declaration
    public void VerifyElementsShown(By locator, TimeSpan? timeout)
    Parameters
    Type Name Description
    By locator

    The locator to find a collection of elements.

    System.Nullable<TimeSpan> timeout

    The amount of time the driver should wait when searching for the locator if it is not immediately present.

    Exceptions
    Type Condition
    ElementsNotShownException

    Thrown when no elements are shown for the expected locator.

    Operators

    | Improve this Doc View Source

    Implicit(RemoteWebElement to WebElementWrapper)

    Allows conversion of a to the WebElementWrapper without direct casting.

    Declaration
    public static implicit operator WebElementWrapper(RemoteWebElement element)
    Parameters
    Type Name Description
    RemoteWebElement element

    The .

    Returns
    Type Description
    WebElementWrapper

    The WebElementWrapper.

    Implements

    IElementWrapper<TElement>

    Extension Methods

    WebElementWrapperExtensions.TryWaitUntil<TElementWrapper, TResult>(TElementWrapper, Func<TElementWrapper, TResult>, Nullable<TimeSpan>, Int32, Action<Exception>)
    WebElementWrapperExtensions.WaitUntil<TElementWrapper, TResult>(TElementWrapper, Func<TElementWrapper, TResult>, Nullable<TimeSpan>, Int32)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright (c) MADE Apps