testdriverai 4.0.77 → 4.0.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
package/lib/system.js CHANGED
@@ -43,12 +43,20 @@ const captureAndResize = async (scale = 1) => {
43
43
 
44
44
  await screenshot({ filename: step1, format: "png" });
45
45
 
46
+ // Fetch the mouse position
47
+ const mousePos = robot.getMousePos();
48
+
49
+ // Location of cursor image
50
+ const cursorPath = path.join(__dirname, "resources", "cursor.png");
51
+
46
52
  // resize to 1:1 px ratio
47
53
  await sharp(step1)
48
54
  .resize(
49
55
  Math.floor(primaryDisplay.currentResX * scale),
50
56
  Math.floor(primaryDisplay.currentResY * scale),
51
57
  )
58
+ // composite the mouse image ontop
59
+ .composite([{ input: cursorPath, left: mousePos.x, top: mousePos.y}])
52
60
  .toFile(step2);
53
61
 
54
62
  return step2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testdriverai",
3
- "version": "4.0.77",
3
+ "version": "4.0.78",
4
4
  "description": "Next generation autonomous AI agent for end-to-end testing of web & desktop",
5
5
  "main": "index.js",
6
6
  "bin": {