feat: handle mouse down

This commit is contained in:
karishmas6
2024-06-08 22:56:55 +05:30
parent 15ffc2984b
commit c9c81f392e

View File

@@ -97,3 +97,13 @@ const onMousedown = async (coordinates: Coordinates) => {
await handleWrapper(handleMousedown, coordinates);
}
const handleMousedown = async (generator: WorkflowGenerator, page: Page, { x, y }: Coordinates) => {
await generator.onClick({ x, y }, page);
const previousUrl = page.url();
const tabsBeforeClick = page.context().pages().length;
await page.mouse.click(x, y);
logger.log('debug', `Clicked on position x:${x}, y:${y}`);
};