testdriverai 5.6.4 → 5.6.6

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.js CHANGED
@@ -1092,14 +1092,6 @@ let run = async (file = thisFile, shouldSave = false, shouldExit = true) => {
1092
1092
  logger.info(``, null);
1093
1093
  logger.info(chalk.yellow(`> ${step.prompt || "no prompt"}`), null);
1094
1094
 
1095
- if (!step.commands && !step.prompt) {
1096
- logger.info(chalk.red("No commands or prompt found"));
1097
- return await exit(true);
1098
- } else if (!step.commands) {
1099
- logger.info(chalk.yellow("No commands found, running exploratory"));
1100
- return await exploratoryLoop(step.prompt, false, true);
1101
- }
1102
-
1103
1095
  if (shouldSave) {
1104
1096
  executionHistory.push({
1105
1097
  prompt: step.prompt,
@@ -1107,15 +1099,25 @@ let run = async (file = thisFile, shouldSave = false, shouldExit = true) => {
1107
1099
  });
1108
1100
  }
1109
1101
 
1110
- let markdown = `\`\`\`yaml
1102
+ if (!step.commands && !step.prompt) {
1103
+ logger.info(chalk.red("No commands or prompt found"));
1104
+ await exit(true);
1105
+ } else if (!step.commands) {
1106
+ logger.info(chalk.yellow("No commands found, running exploratory"));
1107
+ await exploratoryLoop(step.prompt, false, true, false);
1108
+ } else {
1109
+
1110
+ let markdown = `\`\`\`yaml
1111
1111
  ${yaml.dump(step)}
1112
- \`\`\``;
1112
+ \`\`\``;
1113
1113
 
1114
- logger.debug(markdown);
1115
- logger.debug("load calling actOnMarkdown");
1114
+ logger.debug(markdown);
1115
+ logger.debug("load calling actOnMarkdown");
1116
+
1117
+ lastPrompt = step.prompt;
1118
+ await actOnMarkdown(markdown, 0, true, false, shouldSave);
1119
+ }
1116
1120
 
1117
- lastPrompt = step.prompt;
1118
- await actOnMarkdown(markdown, 0, true, false, shouldSave);
1119
1121
 
1120
1122
  if (shouldSave) {
1121
1123
  await save({ silent: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testdriverai",
3
- "version": "5.6.4",
3
+ "version": "5.6.6",
4
4
  "description": "Next generation autonomous AI agent for end-to-end testing of web & desktop",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -0,0 +1,5 @@
1
+ version: 5.6.2
2
+ session: 681cdec532fef6c6f161c4a4
3
+ steps:
4
+ - prompt: focus spotify
5
+ - prompt: focus chrome