Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • WebComponent
    • Toggle

Index

Constructors

constructor

  • new Toggle(adapter: WebAdapter, ancestor?: WebComponent): Toggle
  • Parameters

    • adapter: WebAdapter
    • Optional ancestor: WebComponent

    Returns Toggle

Properties

adapter

adapter: WebAdapter

Optional ancestor

ancestor: Component<WebNode, WebAdapter>

keyboard

keyboard: Keyboard

page

page: Page

selector

selector: string = ".toggle"

Methods

click

  • click(): Effect<void>
  • Returns Effect<void>

doubleClick

  • doubleClick(): Effect<void>
  • Returns Effect<void>

findNodes

  • findNodes(): Promise<WebNode[]>
  • Returns Promise<WebNode[]>

findUniqueNode

  • findUniqueNode(): Promise<WebNode>
  • Returns Promise<WebNode>

first

  • first(): this
  • A call to this method is the same as: this.nth(1)

    Returns this

getNodeCount

  • getNodeCount(): Effect<number>
  • Returns Effect<number>

getText

  • getText(): Effect<string>
  • Returns Effect<string>

    The "rendered" text content of this component and its descendants.

hasFocus

  • hasFocus(): Effect<boolean>
  • Returns Effect<boolean>

isChecked

  • isChecked(): Effect<boolean>

isExisting

  • isExisting(): Effect<boolean>
  • Returns Effect<boolean>

isUnique

  • isUnique(): Effect<boolean>
  • Returns Effect<boolean>

isVisible

  • isVisible(): Effect<boolean>
  • A component is considered visible if it consumes space in the document.

    Returns Effect<boolean>

last

  • last(): this
  • A call to this method is the same as: this.nth(-1)

    Returns this

nth

  • nth(position: number): this
  • Parameters

    • position: number

    Returns this

    An extended copy of this component.

Protected reconstruct

  • reconstruct(): this
  • Returns this

scrollIntoView

  • scrollIntoView(): Effect<void>
  • Returns Effect<void>

toString

  • toString(): string
  • Returns string

where

  • where<TValue>(getter: function, predicate: Predicate<TValue>): this
  • Type parameters

    • TValue

    Parameters

    • getter: function
        • (component: this): Effect<TValue>
        • Parameters

          • component: this

          Returns Effect<TValue>

    • predicate: Predicate<TValue>

    Returns this

    An extended copy of this component.