testdriverai 4.0.28 → 4.0.29

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.
Files changed (2) hide show
  1. package/lib/commands.js +2 -12
  2. package/package.json +1 -1
package/lib/commands.js CHANGED
@@ -33,8 +33,8 @@ const commandOrControl = process.platform === 'darwin' ? 'command' : 'control';
33
33
  const findImageOnScreen = async (relativePath, haystack, restrictToWindow) => {
34
34
  let displayMultiple = await getDisplayMultiple();
35
35
 
36
- // move the file from filePath to `.testdriver/screenshots`
37
- let rootpath = path.join(cwd(), `.testdriver`, `screenshots`, platform());
36
+ // move the file from filePath to `testdriver/screenshots`
37
+ let rootpath = path.join(cwd(), `testdriver`, `screenshots`, platform());
38
38
  // add .png to relative path if not already there
39
39
  if (!relativePath.endsWith('.png')) {
40
40
  relativePath = relativePath + '.png';
@@ -46,7 +46,6 @@ const findImageOnScreen = async (relativePath, haystack, restrictToWindow) => {
46
46
  }
47
47
 
48
48
  let needle = path.join(rootpath, relativePath);
49
- let foundWriteLocation = path.join(cwd(), '.testdriver', '.matches', `${new Date().getTime()}-${relativePath}`);
50
49
 
51
50
  const bar1 = new cliProgress.SingleBar({}, cliProgress.Presets.shades_classic);
52
51
 
@@ -114,15 +113,6 @@ const findImageOnScreen = async (relativePath, haystack, restrictToWindow) => {
114
113
 
115
114
  bar1.stop();
116
115
 
117
- if (foundWriteLocation) {
118
- // Crop the haystack at the coordinates found in result
119
- const imageHaystack = await Jimp.read(haystack);
120
- const croppedImage = imageHaystack.crop(result.x, result.y, result.width, result.height);
121
-
122
- await croppedImage.writeAsync(foundWriteLocation);
123
-
124
- result.foundWriteLocation = foundWriteLocation;
125
- }
126
116
  return result;
127
117
 
128
118
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testdriverai",
3
- "version": "4.0.28",
3
+ "version": "4.0.29",
4
4
  "description": "Next generation autonomous AI agent for end-to-end testing of web & desktop",
5
5
  "main": "index.js",
6
6
  "bin": {