Skip to main content

PlaywrightRootLocator

Playwright-specific implementation of RootLocator.

Hierarchy

  • RootLocator<playwright.Locator>
    • PlaywrightRootLocator

Index

Constructors

constructor

Properties

[custom]

[custom]: (depth: number, options: InspectOptionsStylized, inspect: typeof inspect) => string

Type declaration

    • (depth: number, options: InspectOptionsStylized, inspect: typeof inspect): string
    • Parameters

      • depth: number
      • options: InspectOptionsStylized
      • inspect: typeof inspect

      Returns string

Methods

isPresent

  • isPresent(): Promise<boolean>
  • Returns Promise<boolean>

nativeElement

  • nativeElement(): Promise<Pick<Locator, locator>>
  • Returns Promise<Pick<Locator, locator>>

evaluate

  • evaluate<R, Arguments>(pageFunction: PageFunction<Arguments, R>, arg: Arguments): Promise<R>
  • Evaluates the given pageFunction in the context of the current frame. See playwright.Frame.evaluate.


    Type parameters

    • R
    • Arguments

    Parameters

    • pageFunction: PageFunction<Arguments, R>
    • arg: Arguments

    Returns Promise<R>

switchToFrame

  • switchToFrame(frame: Locator): Promise<void>
  • Switches the current context to the frame identified by the given locator.


    Parameters

    • frame: Locator

    Returns Promise<void>

switchToParentFrame

  • switchToParentFrame(): Promise<void>
  • Switches the current context to the parent frame of the current frame.


    Returns Promise<void>

switchToMainFrame

  • switchToMainFrame(): Promise<void>
  • Switches the context to the top-level frame.


    Returns Promise<void>

toString

  • toString(): string
  • Returns string