pentf
    Preparing search index...

    Function customErrorMessage

    • Attach a custom error message if a promise fails. If the promise succeeds, this function does nothing.

      Parameters

      • promise: Promise<any>

        The promise to wait for.

      • message: string

        Custom message to attach to the error;

      Returns Promise<any>

      const page = newPage(config);
      await page.goto('https://example.org/');
      await customErrorMessage(
      page.waitForSelector('blink'), '<blink> element not found (BUG-123)');
      await closePage(page);