testdriverai 5.7.60 → 5.7.61
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.
- package/docs/snippets/tests/assert-replay.mdx +1 -1
- package/docs/snippets/tests/exec-js-replay.mdx +1 -1
- package/docs/snippets/tests/exec-shell-replay.mdx +1 -1
- package/docs/snippets/tests/hover-image-replay.mdx +1 -1
- package/docs/snippets/tests/hover-text-replay.mdx +1 -1
- package/docs/snippets/tests/hover-text-with-description-replay.mdx +1 -1
- package/docs/snippets/tests/match-image-replay.mdx +1 -1
- package/docs/snippets/tests/press-keys-replay.mdx +1 -1
- package/docs/snippets/tests/prompt-replay.mdx +1 -1
- package/docs/snippets/tests/remember-replay.mdx +1 -1
- package/docs/snippets/tests/scroll-until-text-replay.mdx +1 -1
- package/docs/snippets/tests/type-replay.mdx +1 -1
- package/lib/commands.js +11 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
<iframe src="https://app.dashcam.io/replay/
|
|
1
|
+
<iframe src="https://app.dashcam.io/replay/68533ec4145dfcaca5dc0392?share=IoOQUumZ42LxYjU4Y3EtA&embed=true×tamp=90000&playbackRate=5" width="100%" height="300" />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<iframe src="https://app.dashcam.io/replay/
|
|
1
|
+
<iframe src="https://app.dashcam.io/replay/68533ee04ef7e78d2210145c?share=p6kAlhAPEf1O2OUHHupOzQ&embed=true×tamp=90000&playbackRate=5" width="100%" height="300" />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<iframe src="https://app.dashcam.io/replay/
|
|
1
|
+
<iframe src="https://app.dashcam.io/replay/68533ec34431e06c04eeb584?share=UnWkGXuU6R6yKoe12ZYaA&embed=true×tamp=90000&playbackRate=5" width="100%" height="300" />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<iframe src="https://app.dashcam.io/replay/
|
|
1
|
+
<iframe src="https://app.dashcam.io/replay/68533f274ef7e78d22101475?share=MpepgPrRVRz2CnLY9xwX0Q&embed=true×tamp=90000&playbackRate=5" width="100%" height="300" />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<iframe src="https://app.dashcam.io/replay/
|
|
1
|
+
<iframe src="https://app.dashcam.io/replay/68533ef4ca32a749361048ef?share=olmGpOp6MIVO1mE8IuwaWg&embed=true×tamp=90000&playbackRate=5" width="100%" height="300" />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<iframe src="https://app.dashcam.io/replay/
|
|
1
|
+
<iframe src="https://app.dashcam.io/replay/68533f3d4ef7e78d2210147a?share=GGTCzvPVPWU1jDOaivv3g&embed=true×tamp=90000&playbackRate=5" width="100%" height="300" />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<iframe src="https://app.dashcam.io/replay/
|
|
1
|
+
<iframe src="https://app.dashcam.io/replay/68533f6aca32a74936104904?share=40GRtip8xz6qbSNerc3eQQ&embed=true×tamp=90000&playbackRate=5" width="100%" height="300" />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<iframe src="https://app.dashcam.io/replay/
|
|
1
|
+
<iframe src="https://app.dashcam.io/replay/68533ebf0976ac0d13982e39?share=AILkQH0WkuCDlMdNqs5xgA&embed=true×tamp=90000&playbackRate=5" width="100%" height="300" />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<iframe src="https://app.dashcam.io/replay/
|
|
1
|
+
<iframe src="https://app.dashcam.io/replay/68533f36ca32a749361048fe?share=ErSzyzQDefRjEetF4NdmJg&embed=true×tamp=90000&playbackRate=5" width="100%" height="300" />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<iframe src="https://app.dashcam.io/replay/
|
|
1
|
+
<iframe src="https://app.dashcam.io/replay/68533eb8145dfcaca5dc038a?share=7jtn1EtYydkuJcsVjrZkdQ&embed=true×tamp=90000&playbackRate=5" width="100%" height="300" />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<iframe src="https://app.dashcam.io/replay/
|
|
1
|
+
<iframe src="https://app.dashcam.io/replay/68533f114ef7e78d2210146b?share=xS2drIAytTqywmRXZcmQ&embed=true×tamp=90000&playbackRate=5" width="100%" height="300" />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<iframe src="https://app.dashcam.io/replay/
|
|
1
|
+
<iframe src="https://app.dashcam.io/replay/68533f09145dfcaca5dc03b1?share=OJhVOdaJvhkZQuhQkqID3A&embed=true×tamp=90000&playbackRate=5" width="100%" height="300" />
|
package/lib/commands.js
CHANGED
|
@@ -85,6 +85,17 @@ const findImageOnScreen = async (relativePath, haystack, restrictToWindow) => {
|
|
|
85
85
|
|
|
86
86
|
const scaledNeedle = await Jimp.read(path.join(needle));
|
|
87
87
|
scaledNeedle.scale(needleSize);
|
|
88
|
+
|
|
89
|
+
const haystackImage = await Jimp.read(haystack);
|
|
90
|
+
|
|
91
|
+
if (
|
|
92
|
+
scaledNeedle.bitmap.width > haystackImage.bitmap.width ||
|
|
93
|
+
scaledNeedle.bitmap.height > haystackImage.bitmap.height
|
|
94
|
+
) {
|
|
95
|
+
// Needle is larger than haystack, skip this scale factor
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
|
|
88
99
|
const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "scaledNeedle_"));
|
|
89
100
|
const scaledNeedlePath = path.join(
|
|
90
101
|
tempDir,
|