Options
All
  • Public
  • Public/Protected
  • All
Menu

Module toHaveUrl

Index

Functions

Functions

toHaveUrl

  • toHaveUrl(page: Page, expectedUrl: string, options?: PageWaitForUrlOptions): Promise<SyncExpectationResult>
  • Use toHaveUrl function when you want to check that page's url is equal to the expected url

    example
    await expect(page).toHaveUrl('https://example.com/');
    
    // also you can wait for the url
    await expect(page).toHaveUrl('https://example.com/', {timeout: 5000})
    

    Parameters

    • page: Page
    • expectedUrl: string
    • Optional options: PageWaitForUrlOptions

    Returns Promise<SyncExpectationResult>

Generated using TypeDoc