Search Results for

    Show / Hide Table of Contents

    Class CommandBar

    Defines a wrapper for the core UWP CommandBar control.

    Inheritance
    System.Object
    ElementWrapper<WindowsElement>
    WindowsElementWrapper
    CommandBar
    Implements
    IElementWrapper<WindowsElement>
    Inherited Members
    WindowsElementWrapper.Driver
    WindowsElementWrapper.VerifyDriverElementShown(By, Nullable<TimeSpan>)
    WindowsElementWrapper.VerifyDriverElementsShown(By, Nullable<TimeSpan>)
    ElementWrapper<WindowsElement>.Element
    ElementWrapper<WindowsElement>.ElementDriver
    ElementWrapper<WindowsElement>.IsVisible
    ElementWrapper<WindowsElement>.IsEnabled
    ElementWrapper<WindowsElement>.Click()
    ElementWrapper<WindowsElement>.GetAttribute(String)
    ElementWrapper<WindowsElement>.FindElement(By)
    ElementWrapper<WindowsElement>.VerifyElementNotShown(By)
    ElementWrapper<WindowsElement>.VerifyElementShown(By)
    ElementWrapper<WindowsElement>.VerifyElementShown(By, Nullable<TimeSpan>)
    ElementWrapper<WindowsElement>.VerifyElementsShown(By)
    ElementWrapper<WindowsElement>.VerifyElementsShown(By, Nullable<TimeSpan>)
    Namespace: Legerity.Windows.Elements.Core
    Assembly: Legerity.Windows.dll
    Syntax
    public class CommandBar : WindowsElementWrapper, IElementWrapper<WindowsElement>

    Constructors

    | Improve this Doc View Source

    CommandBar(WindowsElement)

    Initializes a new instance of the CommandBar class.

    Declaration
    public CommandBar(WindowsElement element)
    Parameters
    Type Name Description
    WindowsElement element

    The reference.

    Properties

    | Improve this Doc View Source

    PrimaryButtons

    Gets the collection of primary buttons.

    Declaration
    public virtual IEnumerable<AppBarButton> PrimaryButtons { get; }
    Property Value
    Type Description
    IEnumerable<AppBarButton>
    | Improve this Doc View Source

    SecondaryButtons

    Gets the collection of secondary buttons.

    Note, this property will only return a result when the secondary buttons are shown in the flyout.

    Declaration
    public virtual IEnumerable<AppBarButton> SecondaryButtons { get; }
    Property Value
    Type Description
    IEnumerable<AppBarButton>
    | Improve this Doc View Source

    SecondaryMenuButton

    Gets the AppBarButton for opening the secondary button menu.

    Declaration
    public virtual AppBarButton SecondaryMenuButton { get; }
    Property Value
    Type Description
    AppBarButton

    Methods

    | Improve this Doc View Source

    ClickPrimaryButton(String)

    Clicks a primary button in the command bar with the specified button name or Automation ID.

    Declaration
    public virtual void ClickPrimaryButton(string name)
    Parameters
    Type Name Description
    System.String name

    The name of the button to click.

    | Improve this Doc View Source

    ClickPrimaryButtonByPartialName(String)

    Clicks a primary button in the command bar with the specified partial button name or Automation ID.

    Declaration
    public virtual void ClickPrimaryButtonByPartialName(string partialName)
    Parameters
    Type Name Description
    System.String partialName

    The partial name of the button to click.

    | Improve this Doc View Source

    ClickSecondaryButton(String)

    Clicks a secondary button in the command bar with the specified button name.

    Declaration
    public virtual void ClickSecondaryButton(string name)
    Parameters
    Type Name Description
    System.String name

    The name of the button to click.

    Exceptions
    Type Condition
    ElementNotShownException

    Thrown when the more button is not shown.

    | Improve this Doc View Source

    ClickSecondaryButtonByPartialName(String)

    Clicks a secondary button in the command bar with the specified partial button name.

    Declaration
    public virtual void ClickSecondaryButtonByPartialName(string partialName)
    Parameters
    Type Name Description
    System.String partialName

    The partial name of the button to click.

    Exceptions
    Type Condition
    ElementNotShownException

    Thrown when the more button is not shown.

    | Improve this Doc View Source

    OpenSecondaryButtonMenu()

    Opens the menu associated with the secondary button options.

    Declaration
    public virtual void OpenSecondaryButtonMenu()
    Exceptions
    Type Condition
    ElementNotShownException

    Thrown when the more button is not shown.

    Operators

    | Improve this Doc View Source

    Implicit(AppiumWebElement to CommandBar)

    Allows conversion of a to the CommandBar without direct casting.

    Declaration
    public static implicit operator CommandBar(AppiumWebElement element)
    Parameters
    Type Name Description
    AppiumWebElement element

    The .

    Returns
    Type Description
    CommandBar

    The CommandBar.

    | Improve this Doc View Source

    Implicit(RemoteWebElement to CommandBar)

    Allows conversion of a to the CommandBar without direct casting.

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

    The .

    Returns
    Type Description
    CommandBar

    The CommandBar.

    | Improve this Doc View Source

    Implicit(WindowsElement to CommandBar)

    Allows conversion of a to the CommandBar without direct casting.

    Declaration
    public static implicit operator CommandBar(WindowsElement element)
    Parameters
    Type Name Description
    WindowsElement element

    The .

    Returns
    Type Description
    CommandBar

    The CommandBar.

    Implements

    IElementWrapper<TElement>

    Extension Methods

    WindowsElementWrapperExtensions.TryWaitUntil<TElementWrapper, TResult>(TElementWrapper, Func<TElementWrapper, TResult>, Nullable<TimeSpan>, Int32, Action<Exception>)
    WindowsElementWrapperExtensions.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