Set the value of a Locator of type select to the given option.

Hierarchy

  • Action
    • Select

Properties

Methods - Factory

Methods - Other

Methods - called internally

Properties

abilityAlias?: string
callStack?: CallStackInfo[]

Methods - Factory

  • Set the value of a Locator of type select to the given option.

    Parameters

    • locator: Locator

      the string representing the (select) locator.

    • values: string | string[] | {
          index?: number;
          label?: string;
          value?: string;
      } | {
          index?: number;
          label?: string;
          value?: string;
      }[]

      options to select.

    • Optional options: SelectActionOptions

      (optional) options for the select action.

    Returns Select

    new Select instance

    Example

    simple call with just locator

    Select.option(
    page.locator('myLocator'),
    'myOptionLabel'
    );

    with options for select

    Select.option(
    page.locator('myLocator'),
    'myOptionLabel',
    { timeout: 3000 }
    );

Methods - Other

  • Parameters

    • entry: CallStackInfo

    Returns void

  • Parameters

    • calledWith: CallStackCalledWith

    Returns void

  • Set the alias which is used for an underlying ability

    Parameters

    • alias: undefined | string

      with which an ability was initialized

    Returns this

    current action

Methods - called internally

  • find the specified locator and click on it.

    Parameters

    • actor: Actor

      Actor performing this action

    Returns Promise<any>

    This method checks, waits until all specified options are present in the <select> element and selects these options.

Generated using TypeDoc