Options
All
  • Public
  • Public/Protected
  • All
Menu

Module toHaveTitle

Index

Functions

Functions

toHaveTitle

  • toHaveTitle(page: Page, expectedTitle: string, options?: Options): Promise<SyncExpectationResult>
  • Use toHaveTitle function when you want to check that page's title is equal to the expected title

    example
    await expect(page).toHaveTitle('Documentation');
    
    // also you can check text ignoring case sensitive
    await expect(page).toHaveTitle('documentation', {ignoreCase: true})
    

    Parameters

    • page: Page
    • expectedTitle: string
    • Optional options: Options

    Returns Promise<SyncExpectationResult>

Generated using TypeDoc