Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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;
}