Playwright Cucumber TS Steps
    Preparing search index...

    Function interceptStubJson

    • Intercepts a network URL and returns a stubbed JSON response. Supports Gherkin DocStrings for the body content.

      Parameters

      • page: any
      • url: string
      • body: any

      Returns Promise<void>

      When I pw intercept URL "/api/user" and stub body:
      """
      { "id": 101, "status": "active" }
      """