How to use the @qawolf/config.CONFIG.locatorTimeoutMs function in @qawolf/config

To help you get started, we’ve selected a few @qawolf/config examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github qawolf / qawolf / packages / browser / src / Browser.ts View on Github external
100
      )}`
    );

    const page = await this.getPage(step.pageId, true);

    const jsHandle = await page.evaluateHandle(
      (locator: Locator) => {
        const qawolf: QAWolfWeb = (window as any).qawolf;
        return qawolf.locate.waitForElement(locator);
      },
      {
        action: step.action,
        dataAttribute: CONFIG.dataAttribute,
        target: step.target,
        timeoutMs: CONFIG.locatorTimeoutMs
      } as Serializable
    );

    const handle = jsHandle.asElement();
    if (!handle) {
      throw new Error(`No element handle found for step ${step}`);
    }

    return handle;
  }