Hi,
I noticed that some click events were reproducibly never caught by Katalon Recorder (3.5.5.0 but similar with Katalon Studio latest). I didn’t immediately find why, or in what exact circumstances (most click events were captured, only very few weren’t).
I’ve seen many different complaints/queries in the Katalon discussion fora, most without a definitive answer.
I’ve been debugging the Recorder code quite a lot and it turned out the event was simply not delivered to Katalon by Chrome. So searching instead for a Chrome related issue, I found these articles:
- javascript - Click events are not working in Chrome, but event fires when we execute it manually from console - Stack Overflow
- javascript - Chrome mousedown and mouseup events no longer working, other browsers are fine - Stack Overflow
Connecting the dots, I was able to solve the issue in Katalon Recorder, by adding the following code at the start of Recorder.addEventHandler in recorder.js:
if (eventName == "mousedown") {
Recorder.addEventHandler(handlerName, "pointerdown", handler, options);
Recorder.addEventHandler(handlerName, "touchstart", handler, options);
} else if (eventName == "mousemove") {
Recorder.addEventHandler(handlerName, "pointermove", handler, options);
Recorder.addEventHandler(handlerName, "touchmove", handler, options);
} else if (eventName == "mouseup") {
Recorder.addEventHandler(handlerName, "pointerup", handler, options);
Recorder.addEventHandler(handlerName, "touchend", handler, options);
} else if (eventName == "click") {
Recorder.addEventHandler(handlerName, "tap", handler, options);
}
It would be great if you could verify this and incorporate this in your official releases, or suggest a different approach.
Best regards
Geert