testdriverai 4.1.34 → 4.1.36

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/lib/commander.js CHANGED
@@ -50,7 +50,7 @@ commands:
50
50
  speak(`typing ${object.text}`);
51
51
  log("info", generator.jsonToManual(object));
52
52
  notify(generator.jsonToManual(object, false));
53
- response = await commands.type(object.text);
53
+ response = await commands.type(object.text, object.delay);
54
54
  break;
55
55
  case "press-keys":
56
56
  speak(`pressing keys ${object.keys.join(",")}`);
package/lib/commands.js CHANGED
@@ -360,10 +360,13 @@ let commands = {
360
360
  }
361
361
  },
362
362
  // type a string
363
- type: async (string) => {
363
+ type: async (string, delay = 500) => {
364
364
  await redraw.start();
365
365
  string = string.toString();
366
- await robot.typeString(string);
366
+ if (delay > 0)
367
+ await robot.typeStringDelayed(string, delay);
368
+ else
369
+ await robot.typeString(string);
367
370
  await redraw.wait(5000);
368
371
  return;
369
372
  },
@@ -548,7 +551,7 @@ let commands = {
548
551
  // so we need to release the modifier keys manually
549
552
  robot.keyToggle(commandOrControl, "up");
550
553
  // type the text
551
- await robot.typeString(text);
554
+ await robot.typeStringDelayed(text, 500);
552
555
  await redraw.wait(5000);
553
556
  await robot.keyTap("escape");
554
557
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testdriverai",
3
- "version": "4.1.34",
3
+ "version": "4.1.36",
4
4
  "description": "Next generation autonomous AI agent for end-to-end testing of web & desktop",
5
5
  "main": "index.js",
6
6
  "bin": {