Search Results for

    Show / Hide Table of Contents

    Class WaitUntilConditions

    Defines a set of conditions that can be used with the WaitUntil methods of elements and pages.

    Inheritance
    System.Object
    WaitUntilConditions
    Namespace: Legerity.Helpers
    Assembly: Legerity.Core.dll
    Syntax
    public static class WaitUntilConditions : object

    Methods

    | Improve this Doc View Source

    ElementExists(By)

    A condition for validating whether a specified element found by a locator exists within the context of the page.

    Note, the element may exist but may not be visible.

    Declaration
    public static Func<IWebDriver, bool> ElementExists(By locator)
    Parameters
    Type Name Description
    By locator

    The locator to find the element.

    Returns
    Type Description
    Func<IWebDriver, System.Boolean>

    True if the element exists; otherwise, false.

    | Improve this Doc View Source

    ElementExistsInElement<TElement>(By)

    A condition for validating whether a specified element found by a locator exists within the context of an element.

    Note, the element may exist but may not be visible.

    Declaration
    public static Func<TElement, bool> ElementExistsInElement<TElement>(By locator)
        where TElement : IWebElement
    Parameters
    Type Name Description
    By locator

    The locator to find the element.

    Returns
    Type Description
    Func<TElement, System.Boolean>

    True if the element exists; otherwise, false.

    Type Parameters
    Name Description
    TElement

    The type of .

    | Improve this Doc View Source

    ElementExistsInElementWrapper<TElement>(By)

    A condition for validating whether a specified element found by a locator exists within the context of an element wrapper.

    Note, the element may exist but may not be visible.

    Declaration
    public static Func<IElementWrapper<TElement>, bool> ElementExistsInElementWrapper<TElement>(By locator)
        where TElement : IWebElement
    Parameters
    Type Name Description
    By locator

    The locator to find the element.

    Returns
    Type Description
    Func<IElementWrapper<TElement>, System.Boolean>

    True if the element exists; otherwise, false.

    Type Parameters
    Name Description
    TElement

    The type of .

    | Improve this Doc View Source

    ElementExistsInPage<TPage>(By)

    A condition for validating whether a specified element found by a locator exists within the context of a page object.

    Note, the element may exist but may not be visible.

    Declaration
    public static Func<TPage, bool> ElementExistsInPage<TPage>(By locator)
        where TPage : BasePage
    Parameters
    Type Name Description
    By locator

    The locator to find the element.

    Returns
    Type Description
    Func<TPage, System.Boolean>

    True if the element exists; otherwise, false.

    Type Parameters
    Name Description
    TPage

    The type of BasePage.

    | Improve this Doc View Source

    ElementIsNotVisible(By)

    A condition for validating whether a specified element found by a locator is hidden (not visible) within the context of the page.

    Declaration
    public static Func<IWebDriver, bool> ElementIsNotVisible(By locator)
    Parameters
    Type Name Description
    By locator

    The locator to find the element.

    Returns
    Type Description
    Func<IWebDriver, System.Boolean>

    True if the element is hidden (not visible); otherwise, false.

    | Improve this Doc View Source

    ElementIsNotVisibleInElement<TElement>(By)

    A condition for validating whether a specified element found by a locator is hidden (not visible) within the context of an element.

    Declaration
    public static Func<TElement, bool> ElementIsNotVisibleInElement<TElement>(By locator)
        where TElement : IWebElement
    Parameters
    Type Name Description
    By locator

    The locator to find the element.

    Returns
    Type Description
    Func<TElement, System.Boolean>

    True if the element is hidden (not visible); otherwise, false.

    Type Parameters
    Name Description
    TElement

    The type of .

    | Improve this Doc View Source

    ElementIsNotVisibleInElementWrapper<TElement>(By)

    A condition for validating whether a specified element found by a locator is hidden (not visible) within the context of an element wrapper.

    Declaration
    public static Func<IElementWrapper<TElement>, bool> ElementIsNotVisibleInElementWrapper<TElement>(By locator)
        where TElement : IWebElement
    Parameters
    Type Name Description
    By locator

    The locator to find the element.

    Returns
    Type Description
    Func<IElementWrapper<TElement>, System.Boolean>

    True if the element is hidden (not visible); otherwise, false.

    Type Parameters
    Name Description
    TElement

    The type of .

    | Improve this Doc View Source

    ElementIsNotVisibleInPage<TPage>(By)

    A condition for validating whether a specified element found by a locator is hidden (not visible) within the context of a page object.

    Declaration
    public static Func<TPage, bool> ElementIsNotVisibleInPage<TPage>(By locator)
        where TPage : BasePage
    Parameters
    Type Name Description
    By locator

    The locator to find the element.

    Returns
    Type Description
    Func<TPage, System.Boolean>

    True if the element is hidden (not visible); otherwise, false.

    Type Parameters
    Name Description
    TPage

    The type of BasePage.

    | Improve this Doc View Source

    ElementIsVisible(By)

    A condition for validating whether a specified element found by a locator is visible within the context of the page.

    Declaration
    public static Func<IWebDriver, bool> ElementIsVisible(By locator)
    Parameters
    Type Name Description
    By locator

    The locator to find the element.

    Returns
    Type Description
    Func<IWebDriver, System.Boolean>

    True if the element is visible; otherwise, false.

    | Improve this Doc View Source

    ElementIsVisibleInElement<TElement>(By)

    A condition for validating whether a specified element found by a locator is visible within the context of an element.

    Declaration
    public static Func<TElement, bool> ElementIsVisibleInElement<TElement>(By locator)
        where TElement : IWebElement
    Parameters
    Type Name Description
    By locator

    The locator to find the element.

    Returns
    Type Description
    Func<TElement, System.Boolean>

    True if the element is visible; otherwise, false.

    Type Parameters
    Name Description
    TElement

    The type of .

    | Improve this Doc View Source

    ElementIsVisibleInElementWrapper<TElement>(By)

    A condition for validating whether a specified element found by a locator is visible within the context of an element wrapper.

    Declaration
    public static Func<IElementWrapper<TElement>, bool> ElementIsVisibleInElementWrapper<TElement>(By locator)
        where TElement : IWebElement
    Parameters
    Type Name Description
    By locator

    The locator to find the element.

    Returns
    Type Description
    Func<IElementWrapper<TElement>, System.Boolean>

    True if the element is visible; otherwise, false.

    Type Parameters
    Name Description
    TElement

    The type of .

    | Improve this Doc View Source

    ElementIsVisibleInPage<TPage>(By)

    A condition for validating whether a specified element found by a locator is visible within the context of a page object.

    Declaration
    public static Func<TPage, bool> ElementIsVisibleInPage<TPage>(By locator)
        where TPage : BasePage
    Parameters
    Type Name Description
    By locator

    The locator to find the element.

    Returns
    Type Description
    Func<TPage, System.Boolean>

    True if the element is visible; otherwise, false.

    Type Parameters
    Name Description
    TPage

    The type of BasePage.

    | Improve this Doc View Source

    FrameAvailableToSwitchTo(By)

    A condition for switching to a frame by its name when it is available.

    Declaration
    public static Func<IWebDriver, IWebDriver> FrameAvailableToSwitchTo(By frameLocator)
    Parameters
    Type Name Description
    By frameLocator

    The locator of the frame to switch to.

    Returns
    Type Description
    Func<IWebDriver, IWebDriver>

    The for the frame that has been switched to.

    | Improve this Doc View Source

    FrameAvailableToSwitchTo(String)

    A condition for switching to a frame by its name when it is available.

    Declaration
    public static Func<IWebDriver, IWebDriver> FrameAvailableToSwitchTo(string frameName)
    Parameters
    Type Name Description
    System.String frameName

    The name of the frame to switch to.

    Returns
    Type Description
    Func<IWebDriver, IWebDriver>

    The for the frame that has been switched to.

    | Improve this Doc View Source

    TitleContains(String)

    A condition for validating whether the title of the current Window contains a case-sensitive substring.

    Declaration
    public static Func<IWebDriver, bool> TitleContains(string title)
    Parameters
    Type Name Description
    System.String title

    The fragment of title expected.

    Returns
    Type Description
    Func<IWebDriver, System.Boolean>

    True if the title contains the text; otherwise, false.

    | Improve this Doc View Source

    TitleIs(String, StringComparison)

    A condition for validating whether the title of the current Window matches the specified title.

    Declaration
    public static Func<IWebDriver, bool> TitleIs(string title, StringComparison comparison = null)
    Parameters
    Type Name Description
    System.String title

    The expected title, which must be an exact match.

    StringComparison comparison

    The comparison for validating equality.

    Returns
    Type Description
    Func<IWebDriver, System.Boolean>

    True if the title matches; otherwise, false.

    | Improve this Doc View Source

    UrlContains(String)

    A condition for validating whether the URL of the current Window contains a case-sensitive substring.

    Declaration
    public static Func<IWebDriver, bool> UrlContains(string url)
    Parameters
    Type Name Description
    System.String url

    The fragment of URL expected.

    Returns
    Type Description
    Func<IWebDriver, System.Boolean>

    True if the URL contains the text; otherwise, false.

    | Improve this Doc View Source

    UrlIs(String, StringComparison)

    A condition for validating whether the URL of the current Window matches the specified URL.

    Declaration
    public static Func<IWebDriver, bool> UrlIs(string url, StringComparison comparison = null)
    Parameters
    Type Name Description
    System.String url

    The URL that the page should be on.

    StringComparison comparison

    The comparison for validating equality.

    Returns
    Type Description
    Func<IWebDriver, System.Boolean>

    True if the URL matches; otherwise, false.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright (c) MADE Apps