testdriverai 4.1.33 → 4.1.35
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/commands.js +2 -2
- package/lib/system.js +3 -1
- package/package.json +1 -1
package/lib/commands.js
CHANGED
|
@@ -363,7 +363,7 @@ let commands = {
|
|
|
363
363
|
type: async (string) => {
|
|
364
364
|
await redraw.start();
|
|
365
365
|
string = string.toString();
|
|
366
|
-
await robot.
|
|
366
|
+
await robot.typeStringDelayed(string, 500);
|
|
367
367
|
await redraw.wait(5000);
|
|
368
368
|
return;
|
|
369
369
|
},
|
|
@@ -548,7 +548,7 @@ let commands = {
|
|
|
548
548
|
// so we need to release the modifier keys manually
|
|
549
549
|
robot.keyToggle(commandOrControl, "up");
|
|
550
550
|
// type the text
|
|
551
|
-
await robot.
|
|
551
|
+
await robot.typeStringDelayed(text, 500);
|
|
552
552
|
await redraw.wait(5000);
|
|
553
553
|
await robot.keyTap("escape");
|
|
554
554
|
} catch (e) {
|
package/lib/system.js
CHANGED
|
@@ -28,8 +28,10 @@ const getSystemInformationOsInfo = async () => {
|
|
|
28
28
|
return await si.osInfo();
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
+
let countImages = 0;
|
|
31
32
|
const tmpFilename = () => {
|
|
32
|
-
|
|
33
|
+
countImages = countImages + 1;
|
|
34
|
+
return path.join(os.tmpdir(), `${new Date().getTime() + countImages}.png`);
|
|
33
35
|
};
|
|
34
36
|
|
|
35
37
|
const captureAndResize = async (scale = 1, silent = false, mouse = false) => {
|