testdriverai 4.1.28 → 4.1.30

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # TestDriver.ai
4
4
 
5
- Next generation autonomous AI agent for end-to-end testing of web & desktop
5
+ Automate and scale QA with agentic users. Next generation autonomous AI agent for end-to-end testing of web & desktop.
6
6
 
7
7
  [Docs](https://docs.testdriver.ai) | [Website](https://testdriver.ai) | [GitHub Action](https://github.com/marketplace/actions/testdriver-ai) | [Join our Discord](https://discord.gg/a8Cq739VWn)
8
8
 
package/lib/commands.js CHANGED
@@ -436,7 +436,7 @@ let commands = {
436
436
  wait: async (timeout = 3000) => {
437
437
  return await delay(timeout);
438
438
  },
439
- "wait-for-image": async (description, timeout = 5000) => {
439
+ "wait-for-image": async (description, timeout = 10000) => {
440
440
  log("info", "");
441
441
  log(
442
442
  "info",
@@ -451,11 +451,8 @@ let commands = {
451
451
  let passed = false;
452
452
 
453
453
  while (durationPassed < timeout && !passed) {
454
- const response = await sdk.req("assert", {
455
- needle: description,
456
- image: await captureScreenBase64(),
457
- });
458
- passed = response.data;
454
+
455
+ passed = await assert(`An image matching the description "${description}" appears on screen.`, false, false);
459
456
 
460
457
  durationPassed = new Date().getTime() - startTime;
461
458
  if (!passed) {
@@ -625,13 +622,10 @@ let commands = {
625
622
  let incrementDistance = 500;
626
623
  let passed = false;
627
624
 
628
- while (scrollDistance < maxDistance && !passed) {
629
- const response = await sdk.req("assert", {
630
- needle: `An image matching the description "${description}" appears on screen.`,
631
- image: await captureScreenBase64(),
632
- });
625
+ while (scrollDistance <= maxDistance && !passed) {
626
+
627
+ passed = await assert(`An image matching the description "${description}" appears on screen.`, false, false);
633
628
 
634
- passed = response.data;
635
629
  if (!passed) {
636
630
  log(
637
631
  "info",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testdriverai",
3
- "version": "4.1.28",
3
+ "version": "4.1.30",
4
4
  "description": "Next generation autonomous AI agent for end-to-end testing of web & desktop",
5
5
  "main": "index.js",
6
6
  "bin": {