Options
All
  • Public
  • Public/Protected
  • All
Menu

Module toBeVisible

Index

Functions

Functions

toBeVisible

  • toBeVisible(element: UIElement, expectedState: boolean, options??: Options): Promise<SyncExpectationResult>
  • Use toBeVisible function when you want to check that an element is visible

    example
    // could be used with Promise<ElementHandle>
    await expect(page.$('.btn')).toBeVisible(true);
    
    // or with ElementHandle
    const toastElement = await page.$('.btn);
    await expect(toastElement).toBeVisible(true);
    
    // or using an array of page and selector
    await expect([page, '.btn']).toBeVisible(true);
    
    

    Parameters

    • element: UIElement
    • expectedState: boolean
    • Optional options: Options = true

    Returns Promise<SyncExpectationResult>

Generated using TypeDoc