From 528774e09c132fbd5d859fb98899c1ec4be89ae5 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sat, 8 Jun 2024 22:58:19 +0530 Subject: [PATCH] docs: handle mouse down --- server/src/browser-management/inputHandlers.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/server/src/browser-management/inputHandlers.ts b/server/src/browser-management/inputHandlers.ts index dc845a20..03fe515d 100644 --- a/server/src/browser-management/inputHandlers.ts +++ b/server/src/browser-management/inputHandlers.ts @@ -97,7 +97,16 @@ const onMousedown = async (coordinates: Coordinates) => { await handleWrapper(handleMousedown, coordinates); } - +/** + * A mousedown event handler. + * Reproduces the click on the remote browser instance + * and generates pair data for the recorded workflow. + * @param generator - the workflow generator {@link Generator} + * @param page - the active page of the remote browser + * @param x - the x coordinate of the mousedown event + * @param y - the y coordinate of the mousedown event + * @category BrowserManagement + */ const handleMousedown = async (generator: WorkflowGenerator, page: Page, { x, y }: Coordinates) => { await generator.onClick({ x, y }, page); const previousUrl = page.url();