testdriverai 6.0.19 → 6.0.20
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/agent/lib/commands.js
CHANGED
|
@@ -547,7 +547,7 @@ const createCommands = (
|
|
|
547
547
|
"scroll-until-text": async (
|
|
548
548
|
text,
|
|
549
549
|
direction = "down",
|
|
550
|
-
maxDistance =
|
|
550
|
+
maxDistance = 10000,
|
|
551
551
|
textMatchMethod = "turbo",
|
|
552
552
|
method = "keyboard",
|
|
553
553
|
) => {
|
|
@@ -574,10 +574,7 @@ const createCommands = (
|
|
|
574
574
|
}
|
|
575
575
|
|
|
576
576
|
let scrollDistance = 0;
|
|
577
|
-
let incrementDistance =
|
|
578
|
-
if (method === "mouse") {
|
|
579
|
-
incrementDistance = 200;
|
|
580
|
-
}
|
|
577
|
+
let incrementDistance = 500;
|
|
581
578
|
let passed = false;
|
|
582
579
|
|
|
583
580
|
while (scrollDistance <= maxDistance && !passed) {
|
package/package.json
CHANGED
package/schema.json
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
version: 6.0.0
|
|
2
|
+
session: 67f00511acbd9ccac373edf7
|
|
3
|
+
steps:
|
|
4
|
+
- prompt: scroll until image
|
|
5
|
+
commands:
|
|
6
|
+
- command: press-keys
|
|
7
|
+
keys:
|
|
8
|
+
- ctrl
|
|
9
|
+
- l
|
|
10
|
+
- command: type
|
|
11
|
+
text: https://en.wikipedia.org/wiki/Leonardo_da_Vinci
|
|
12
|
+
- command: press-keys
|
|
13
|
+
keys:
|
|
14
|
+
- enter
|
|
15
|
+
- command: hover-text
|
|
16
|
+
text: Leonardo Da Vinci
|
|
17
|
+
description: the page heazding
|
|
18
|
+
action: click
|
|
19
|
+
- command: scroll-until-image
|
|
20
|
+
description: a brown colored house
|
|
21
|
+
direction: down
|