Options
All
  • Public
  • Public/Protected
  • All
Menu

Module toBeEnabled

Index

Functions

Functions

toBeEnabled

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

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

    Parameters

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

    Returns Promise<SyncExpectationResult>

Generated using TypeDoc