Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InternalElementBaseDriver

Wrapper for element entity which has already been initialized. Supports context model. If custom context (Frame or another Page) would be defined, it would be used, otherwise would be used default context.

Hierarchy

  • InternalElementBaseDriver

Index

Element Base

isSelected

isSelected: (...args: any) => Promise<boolean> = ...

Checks if root element has selected class.

Type declaration

    • (...args: any): Promise<boolean>
    • Parameters

      • Rest ...args: any

      Returns Promise<boolean>

click

  • click(options?: ClickOptions): Promise<void>

clickOnInternalElement

  • clickOnInternalElement(selector: string, options?: ClickOptions): Promise<any>
  • Clicks on internal element which is child from root element on current context. Supports css or xPath selectors. If does not found - throws an exception.

    Parameters

    • selector: string
    • Optional options: ClickOptions

    Returns Promise<any>

getAttribute

  • getAttribute(attr: string): Promise<string>

getBoundingBox

  • getBoundingBox(): Promise<BoundingBox>

getInnerElements

  • getInnerElements(selector: string, shouldBeNotEmpty?: boolean): Promise<ElementHandle<Element>[]>
  • Gets child elements from root element. Can wait for array to be not empty. (Default - doesn't wait) Supports xPath and css selectors.

    Parameters

    • selector: string
    • shouldBeNotEmpty: boolean = false

    Returns Promise<ElementHandle<Element>[]>

getInternalElementText

  • getInternalElementText(selector: string): Promise<string>

getValue

  • getValue(): Promise<any>

hover

  • hover(): Promise<void>

isChecked

  • isChecked(): Promise<boolean>

isDisabled

  • isDisabled(): Promise<boolean>

isInternalElementExist

  • isInternalElementExist(selector: string): Promise<boolean>

scrollIntoView

  • scrollIntoView(alignToTop?: boolean): Promise<void>

waitForInternalElementNotToExist

  • waitForInternalElementNotToExist(selector: string): Promise<void>

waitForInternalSelector

  • waitForInternalSelector(selector: string): Promise<any>

waitForPositionToBeStable

  • waitForPositionToBeStable(): Promise<void>

waitForSelector

  • waitForSelector(selector: string, options?: WaitForSelectorOptions): Promise<ElementHandle<Element>>

waitToBeHidden

  • waitToBeHidden(): Promise<null | void | ElementHandle<Element>>

Other

constructor

  • new InternalElementBaseDriver(element: ElementHandle<Element>, defaultContext: Page, customContext?: Page | Frame): InternalElementBaseDriver

context

context: DocumentContext = ...

Generated using TypeDoc