@mablhq/mabl-cli 1.16.23 → 1.17.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.
Files changed (135) hide show
  1. package/api/basicApiClient.js +9 -4
  2. package/api/mablApiClient.js +14 -7
  3. package/browserLauncher/browserLauncherFactory.js +2 -1
  4. package/browserLauncher/elementHandle.js +2 -1
  5. package/browserLauncher/playwrightBrowserLauncher/playwrightBrowser.js +5 -1
  6. package/browserLauncher/playwrightBrowserLauncher/playwrightBrowserLauncher.js +11 -9
  7. package/browserLauncher/playwrightBrowserLauncher/playwrightDom.js +22 -18
  8. package/browserLauncher/playwrightBrowserLauncher/playwrightFrame.js +10 -6
  9. package/browserLauncher/playwrightBrowserLauncher/playwrightHttpRequest.js +5 -1
  10. package/browserLauncher/playwrightBrowserLauncher/playwrightPage.js +13 -9
  11. package/browserLauncher/puppeteerBrowserLauncher/puppeteerBrowser.js +3 -2
  12. package/browserLauncher/puppeteerBrowserLauncher/puppeteerBrowserLauncher.js +1 -1
  13. package/browserLauncher/puppeteerBrowserLauncher/puppeteerElementHandle.js +10 -10
  14. package/browserLauncher/puppeteerBrowserLauncher/puppeteerFrame.js +6 -6
  15. package/browserLauncher/puppeteerBrowserLauncher/puppeteerHttpRequest.js +1 -1
  16. package/browserLauncher/puppeteerBrowserLauncher/puppeteerHttpResponse.js +1 -1
  17. package/browserLauncher/puppeteerBrowserLauncher/puppeteerJsHandle.js +3 -3
  18. package/browserLauncher/puppeteerBrowserLauncher/puppeteerPage.js +15 -11
  19. package/cli.js +12 -8
  20. package/commands/applications/applications_cmds/describe.js +4 -4
  21. package/commands/applications/applications_cmds/list.js +4 -4
  22. package/commands/auth/auth_cmds/activate-key.js +1 -1
  23. package/commands/branches/branches_cmds/create.js +4 -4
  24. package/commands/branches/branches_cmds/describe.js +3 -3
  25. package/commands/branches/branches_cmds/list.js +3 -3
  26. package/commands/branches/branches_cmds/merge.js +4 -4
  27. package/commands/commandUtil/codeInsights.js +4 -2
  28. package/commands/commandUtil/describe.js +1 -1
  29. package/commands/commandUtil/fileUtil.js +5 -1
  30. package/commands/commandUtil/util.js +2 -2
  31. package/commands/config/config_cmds/delete.js +1 -1
  32. package/commands/config/config_cmds/set.js +1 -1
  33. package/commands/constants.js +3 -1
  34. package/commands/credentials/credentials_cmds/list.js +4 -4
  35. package/commands/deploy/deploy_cmds/create.js +18 -13
  36. package/commands/deploy/deploy_cmds/describe.js +5 -5
  37. package/commands/deploy/deploy_cmds/executionResultPresenter.js +1 -1
  38. package/commands/deploy/deploy_cmds/list.js +4 -4
  39. package/commands/deploy/deploy_cmds/watch.js +2 -2
  40. package/commands/environments/environments_cmds/create.js +7 -7
  41. package/commands/environments/environments_cmds/delete.js +1 -1
  42. package/commands/environments/environments_cmds/describe.js +4 -4
  43. package/commands/environments/environments_cmds/list.js +4 -4
  44. package/commands/environments/environments_cmds/update.js +2 -2
  45. package/commands/environments/environments_cmds/urls_cmds/add.js +3 -3
  46. package/commands/environments/environments_cmds/urls_cmds/list.js +2 -2
  47. package/commands/flows/flows_cmds/export.js +5 -5
  48. package/commands/flows/flows_cmds/list.js +2 -2
  49. package/commands/link-agents/link-agents_cmds/delete.js +1 -1
  50. package/commands/plans/plans_cmds/describe.js +4 -4
  51. package/commands/plans/plans_cmds/list.js +2 -2
  52. package/commands/test-runs/test-runs_cmds/export.js +2 -2
  53. package/commands/tests/executionUtil.js +5 -5
  54. package/commands/tests/testsUtil.js +30 -18
  55. package/commands/tests/tests_cmds/create.js +3 -3
  56. package/commands/tests/tests_cmds/edit.js +3 -3
  57. package/commands/tests/tests_cmds/export.js +7 -7
  58. package/commands/tests/tests_cmds/import.js +35 -14
  59. package/commands/tests/tests_cmds/list.js +3 -3
  60. package/commands/tests/tests_cmds/run-alpha.js +3 -3
  61. package/commands/tests/tests_cmds/run-cloud.js +4 -4
  62. package/commands/tests/tests_cmds/run-legacy.js +8 -8
  63. package/commands/tests/tests_cmds/run.js +13 -8
  64. package/commands/tests/tests_cmds/trainer_cmds/trainerUtil.js +2 -2
  65. package/commands/tests/tests_cmds/trainer_cmds/update.js +1 -1
  66. package/commands/tests/tests_cmds/trainer_cmds/version.js +2 -2
  67. package/commands/workspaces/workspace_cmds/copy.js +2 -2
  68. package/commands/workspaces/workspace_cmds/describe.js +4 -4
  69. package/commands/workspaces/workspace_cmds/list.js +2 -2
  70. package/configGenerators/flowConfigGenerator.js +1 -1
  71. package/configGenerators/selIdeGenerator.js +6 -6
  72. package/core/messaging/actions/runnerActions.js +2 -2
  73. package/core/trainer/openUtils.js +2 -2
  74. package/core/trainer/trainingSessions.js +26 -26
  75. package/domUtil/index.js +1 -1
  76. package/domUtil/index.js.LICENSE.txt +5 -5
  77. package/env/env.js +5 -1
  78. package/execution/index.js +1 -1
  79. package/execution/index.js.LICENSE.txt +5 -5
  80. package/mablApi/index.js +1 -1
  81. package/mablscript/AttributesConstants.js +2 -1
  82. package/mablscript/MablStep.js +6 -12
  83. package/mablscript/actions/ConditionAction.js +1 -1
  84. package/mablscript/actions/FindAction.js +54 -60
  85. package/mablscript/actions/GetUrlAction.js +1 -1
  86. package/mablscript/actions/GetVariableValue.js +1 -1
  87. package/mablscript/actions/JavaScriptAction.js +16 -16
  88. package/mablscript/importer.js +7 -7
  89. package/mablscript/steps/AccessibilityCheck.js +9 -7
  90. package/mablscript/steps/AssertStep.js +27 -27
  91. package/mablscript/steps/AssertStepOld.js +10 -10
  92. package/mablscript/steps/ClickAndHoldStep.js +5 -5
  93. package/mablscript/steps/ClickStep.js +6 -6
  94. package/mablscript/steps/CreateVariableStep.js +8 -8
  95. package/mablscript/steps/DoubleClickStep.js +7 -7
  96. package/mablscript/steps/EchoStep.js +2 -2
  97. package/mablscript/steps/EnterTextStep.js +9 -9
  98. package/mablscript/steps/HoverStep.js +6 -6
  99. package/mablscript/steps/IfConditionStep.js +8 -7
  100. package/mablscript/steps/NavigateStep.js +1 -1
  101. package/mablscript/steps/ReleaseStep.js +5 -5
  102. package/mablscript/steps/SelectStep.js +5 -5
  103. package/mablscript/steps/SendHttpRequestStep.js +1 -1
  104. package/mablscript/steps/SendKeyStep.js +7 -7
  105. package/mablscript/steps/SetFilesStep.js +5 -5
  106. package/mablscript/steps/SetViewportStep.js +1 -1
  107. package/mablscript/steps/SwitchContextStep.js +12 -12
  108. package/mablscript/steps/VisitUrlStep.js +1 -1
  109. package/mablscript/steps/WaitStep.js +1 -1
  110. package/mablscript/steps/WaitUntilStep.js +3 -3
  111. package/mablscript/types/OperatingSystemDescriptor.js +5 -1
  112. package/mablscript/types/VariableNamespace.js +1 -1
  113. package/mablscriptFind/index.js +1 -1
  114. package/mablscriptFind/index.js.LICENSE.txt +5 -5
  115. package/observers/mockObserver.js +4 -2
  116. package/package.json +55 -56
  117. package/popupDismissal/index.js +3 -3
  118. package/providers/authenticationProvider.js +3 -3
  119. package/providers/logging/loggingProvider.js +5 -1
  120. package/proxy/index.js +2 -1
  121. package/proxy/index.js.LICENSE.txt +5 -0
  122. package/reporters/mochAwesome/mochAwesomeReporter.js +11 -7
  123. package/reporters/reporter.js +1 -1
  124. package/resources/mablFind.js +1 -1
  125. package/resources/pdf-viewer/embeddedPdfDetection.js +17 -7
  126. package/resources/popupDismissal.js +1 -1
  127. package/util/RichPromise.js +1 -0
  128. package/util/actionabilityUtil.js +18 -14
  129. package/util/analytics.js +7 -3
  130. package/util/downloadUtil.js +6 -2
  131. package/util/httpUtil.js +6 -2
  132. package/util/logUtils.js +7 -1
  133. package/util/markdownUtil.js +1 -1
  134. package/util/pureUtil.js +5 -1
  135. package/util/resourceUtil.js +5 -1
@@ -4,7 +4,7 @@ exports.AssertStepOld = void 0;
4
4
  const ExtractAction_1 = require("../actions/ExtractAction");
5
5
  const MablStep_1 = require("../MablStep");
6
6
  const FindAction_1 = require("../actions/FindAction");
7
- const mablscriptFind_1 = require("../../mablscriptFind");
7
+ const domUtil_1 = require("../../domUtil");
8
8
  const importer_1 = require("../importer");
9
9
  const oldToNewAssertionTypes = {
10
10
  assert_contains: 'AssertContains',
@@ -63,19 +63,19 @@ class AssertStepOld extends MablStep_1.MablStep {
63
63
  }
64
64
  const find = this.findAction.toDescriptor();
65
65
  switch (find.findType) {
66
- case mablscriptFind_1.FindType.FIND_COOKIE:
67
- case mablscriptFind_1.FindType.FIND_EMAIL:
66
+ case domUtil_1.FindType.FIND_COOKIE:
67
+ case domUtil_1.FindType.FIND_EMAIL:
68
68
  formatted.findType = FindAction_1.findTypesToFormattedType[find.findType];
69
69
  formatted.selector = find.findTarget;
70
70
  break;
71
- case mablscriptFind_1.FindType.FIND_FIRST:
72
- case mablscriptFind_1.FindType.FIND_LAST:
73
- case mablscriptFind_1.FindType.FIND_ANY:
74
- case mablscriptFind_1.FindType.FIND_ALL:
71
+ case domUtil_1.FindType.FIND_FIRST:
72
+ case domUtil_1.FindType.FIND_LAST:
73
+ case domUtil_1.FindType.FIND_ANY:
74
+ case domUtil_1.FindType.FIND_ALL:
75
75
  formatted.findType = FindAction_1.findTypesToFormattedType[find.findType];
76
76
  formatted.selector = find.findTarget;
77
77
  break;
78
- case mablscriptFind_1.FindType.FIND_ONE:
78
+ case domUtil_1.FindType.FIND_ONE:
79
79
  formatted.selector = find.findTarget.selector;
80
80
  break;
81
81
  default:
@@ -84,8 +84,8 @@ class AssertStepOld extends MablStep_1.MablStep {
84
84
  return formatted;
85
85
  }
86
86
  getNewAssertionStep() {
87
- const yamlified = importer_1.yamlifyTheLoadedSteps([this]);
88
- const reloadedSteps = importer_1.loadYamlSteps(yamlified);
87
+ const yamlified = (0, importer_1.yamlifyTheLoadedSteps)([this]);
88
+ const reloadedSteps = (0, importer_1.loadYamlSteps)(yamlified);
89
89
  const result = reloadedSteps[0];
90
90
  if (this.stepSourceIndexInFlow !== undefined) {
91
91
  result.setStepSourceIndexInFlow(this.stepSourceIndexInFlow);
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ClickAndHoldStep = void 0;
4
4
  const FindAction_1 = require("../actions/FindAction");
5
5
  const MablStep_1 = require("../MablStep");
6
- const mablscriptFind_1 = require("../../mablscriptFind");
6
+ const domUtil_1 = require("../../domUtil");
7
7
  const ActionsUtils_1 = require("./ActionsUtils");
8
8
  class ClickAndHoldStep extends MablStep_1.MablStep {
9
9
  constructor(name, args, actions) {
@@ -30,10 +30,10 @@ class ClickAndHoldStep extends MablStep_1.MablStep {
30
30
  toStepDescriptor() {
31
31
  const find = this.findAction.toDescriptor();
32
32
  switch (find.findType) {
33
- case mablscriptFind_1.FindType.FIND_FIRST:
34
- case mablscriptFind_1.FindType.FIND_LAST:
35
- case mablscriptFind_1.FindType.FIND_ANY:
36
- case mablscriptFind_1.FindType.FIND_ONE:
33
+ case domUtil_1.FindType.FIND_FIRST:
34
+ case domUtil_1.FindType.FIND_LAST:
35
+ case domUtil_1.FindType.FIND_ANY:
36
+ case domUtil_1.FindType.FIND_ONE:
37
37
  return {
38
38
  find,
39
39
  isHtml5: this.clickArgs.isHtml5,
@@ -4,7 +4,7 @@ exports.ClickStep = void 0;
4
4
  const FindAction_1 = require("../actions/FindAction");
5
5
  const SeleniumIdeStep_1 = require("./SeleniumIdeStep");
6
6
  const MablStep_1 = require("../MablStep");
7
- const mablscriptFind_1 = require("../../mablscriptFind");
7
+ const domUtil_1 = require("../../domUtil");
8
8
  const ActionsUtils_1 = require("./ActionsUtils");
9
9
  class ClickStep extends MablStep_1.MablStep {
10
10
  constructor(name, args, actions) {
@@ -17,10 +17,10 @@ class ClickStep extends MablStep_1.MablStep {
17
17
  toStepDescriptor() {
18
18
  const find = this.findAction.toDescriptor();
19
19
  switch (find.findType) {
20
- case mablscriptFind_1.FindType.FIND_FIRST:
21
- case mablscriptFind_1.FindType.FIND_LAST:
22
- case mablscriptFind_1.FindType.FIND_ANY:
23
- case mablscriptFind_1.FindType.FIND_ONE:
20
+ case domUtil_1.FindType.FIND_FIRST:
21
+ case domUtil_1.FindType.FIND_LAST:
22
+ case domUtil_1.FindType.FIND_ANY:
23
+ case domUtil_1.FindType.FIND_ONE:
24
24
  return {
25
25
  find,
26
26
  descriptorToActionMap: new Map().set(find, this.findAction),
@@ -38,7 +38,7 @@ class ClickStep extends MablStep_1.MablStep {
38
38
  };
39
39
  }
40
40
  produceSelIdeFormattedSteps(_stepIndex) {
41
- const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('click', this);
41
+ const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('click', this);
42
42
  seleniumStep.target = this.findAction.getSelIdeTarget();
43
43
  return [seleniumStep];
44
44
  }
@@ -8,7 +8,7 @@ const FindAction_1 = require("../actions/FindAction");
8
8
  const GenerateEmailAddressAction_1 = require("../actions/GenerateEmailAddressAction");
9
9
  const GenerateRandomStringAction_1 = require("../actions/GenerateRandomStringAction");
10
10
  const CreateVariableStepDescriptor_1 = require("../types/CreateVariableStepDescriptor");
11
- const mablscriptFind_1 = require("../../mablscriptFind");
11
+ const domUtil_1 = require("../../domUtil");
12
12
  const JavaScriptAction_1 = require("../actions/JavaScriptAction");
13
13
  const CountAction_1 = require("../actions/CountAction");
14
14
  class CreateVariableStep extends MablStep_1.MablStep {
@@ -156,10 +156,10 @@ class CreateVariableStep extends MablStep_1.MablStep {
156
156
  switch (this.generationType) {
157
157
  case CreateVariableStepDescriptor_1.VariableGenerator.ATTRIBUTE:
158
158
  if (this.actions[1].extractionAttribute === 'innerText') {
159
- seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('storeText', this);
159
+ seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('storeText', this);
160
160
  }
161
161
  else {
162
- seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('storeAttribute', this);
162
+ seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('storeAttribute', this);
163
163
  }
164
164
  seleniumStep.target = this.actions[0].getSelIdeTarget();
165
165
  seleniumStep.value = this.variableName;
@@ -176,20 +176,20 @@ class CreateVariableStep extends MablStep_1.MablStep {
176
176
  return `\${Math.round((Math.pow(36, ${length} + 1) - Math.random() * Math.pow(36, ${length}))).toString(36).slice(1)}`;
177
177
  });
178
178
  const executeScript = 'return ' + '`' + translated + '`';
179
- seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('executeScript', this);
179
+ seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('executeScript', this);
180
180
  seleniumStep.target = executeScript;
181
181
  seleniumStep.value = this.variableName;
182
182
  return [seleniumStep];
183
183
  case CreateVariableStepDescriptor_1.VariableGenerator.EMAIL:
184
- seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('echo', this);
184
+ seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('echo', this);
185
185
  seleniumStep.value = `Generate email address for variable name '${this.variableName} is not supported for Selenium IDE export`;
186
186
  return [seleniumStep];
187
187
  case CreateVariableStepDescriptor_1.VariableGenerator.ELEMENT_COUNT:
188
- seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('echo', this);
188
+ seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('echo', this);
189
189
  seleniumStep.value = `Find and store count of elements for variable name '${this.variableName} is not supported for Selenium IDE export`;
190
190
  return [seleniumStep];
191
191
  case CreateVariableStepDescriptor_1.VariableGenerator.JAVASCRIPT:
192
- seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('echo', this);
192
+ seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('echo', this);
193
193
  seleniumStep.value = `[${this.getStepName()}${this.actions[0].javaScript
194
194
  ? ' from JavaScript'
195
195
  : ''}] step for variable name '${this.variableName} is not supported for Selenium IDE export`;
@@ -207,7 +207,7 @@ class CreateVariableStep extends MablStep_1.MablStep {
207
207
  actions.push(new ExtractAction_1.ExtractAction('extract_attribute', [generator.attribute]));
208
208
  break;
209
209
  case CreateVariableStepDescriptor_1.VariableGenerator.ELEMENT_COUNT:
210
- actions.push(FindAction_1.FindAction.findActionFromStepArgs(stepArgs, mablscriptFind_1.FindType.FIND_ALL));
210
+ actions.push(FindAction_1.FindAction.findActionFromStepArgs(stepArgs, domUtil_1.FindType.FIND_ALL));
211
211
  actions.push(new CountAction_1.CountAction('count', []));
212
212
  break;
213
213
  case CreateVariableStepDescriptor_1.VariableGenerator.EMAIL:
@@ -4,7 +4,7 @@ exports.DoubleClickStep = void 0;
4
4
  const SeleniumIdeStep_1 = require("./SeleniumIdeStep");
5
5
  const MablStep_1 = require("../MablStep");
6
6
  const FindAction_1 = require("../actions/FindAction");
7
- const mablscriptFind_1 = require("../../mablscriptFind");
7
+ const domUtil_1 = require("../../domUtil");
8
8
  class DoubleClickStep extends MablStep_1.MablStep {
9
9
  constructor(name, args, actions) {
10
10
  super(name, args, actions);
@@ -22,11 +22,11 @@ class DoubleClickStep extends MablStep_1.MablStep {
22
22
  toStepDescriptor() {
23
23
  const find = this.findAction.toDescriptor();
24
24
  switch (find.findType) {
25
- case mablscriptFind_1.FindType.FIND_FIRST:
26
- case mablscriptFind_1.FindType.FIND_LAST:
27
- case mablscriptFind_1.FindType.FIND_ANY:
28
- case mablscriptFind_1.FindType.FIND_ALL:
29
- case mablscriptFind_1.FindType.FIND_ONE:
25
+ case domUtil_1.FindType.FIND_FIRST:
26
+ case domUtil_1.FindType.FIND_LAST:
27
+ case domUtil_1.FindType.FIND_ANY:
28
+ case domUtil_1.FindType.FIND_ALL:
29
+ case domUtil_1.FindType.FIND_ONE:
30
30
  return {
31
31
  find,
32
32
  descriptorToActionMap: new Map().set(find, this.findAction),
@@ -47,7 +47,7 @@ class DoubleClickStep extends MablStep_1.MablStep {
47
47
  return new DoubleClickStep('double_click', [], [FindAction_1.FindAction.findActionFromStepArgs(stepArgs)]);
48
48
  }
49
49
  produceSelIdeFormattedSteps(_stepIndex) {
50
- const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('doubleClick', this);
50
+ const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('doubleClick', this);
51
51
  seleniumStep.target = this.findAction.getSelIdeTarget();
52
52
  return [seleniumStep];
53
53
  }
@@ -7,7 +7,7 @@ const MablAction_1 = require("../MablAction");
7
7
  class EchoStep extends MablStep_1.MablStep {
8
8
  constructor(name, args, actions) {
9
9
  super(name, args, actions);
10
- this.echoValue = MablAction_1.parseArgument(this.getActionArgs()[0]);
10
+ this.echoValue = (0, MablAction_1.parseArgument)(this.getActionArgs()[0]);
11
11
  }
12
12
  getStepName() {
13
13
  return 'Echo';
@@ -16,7 +16,7 @@ class EchoStep extends MablStep_1.MablStep {
16
16
  return { value: this.echoValue.toString() };
17
17
  }
18
18
  produceSelIdeFormattedSteps(_stepIndex) {
19
- const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('echo', this);
19
+ const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('echo', this);
20
20
  seleniumStep.target = this.substituteSeleniumVariable(this.echoValue);
21
21
  return [seleniumStep];
22
22
  }
@@ -5,14 +5,14 @@ const FindAction_1 = require("../actions/FindAction");
5
5
  const SeleniumIdeStep_1 = require("./SeleniumIdeStep");
6
6
  const MablAction_1 = require("../MablAction");
7
7
  const MablStep_1 = require("../MablStep");
8
- const mablscriptFind_1 = require("../../mablscriptFind");
8
+ const domUtil_1 = require("../../domUtil");
9
9
  class EnterTextStep extends MablStep_1.MablStep {
10
10
  constructor(name, args, actions) {
11
11
  super(name, args, actions);
12
12
  const arg = this.getActionArgs()[0];
13
- this.text = MablAction_1.parseArgument(arg);
13
+ this.text = (0, MablAction_1.parseArgument)(arg);
14
14
  this.validate();
15
- if (mablscriptFind_1.isFindElementType(this.actions[0].getActionName())) {
15
+ if ((0, domUtil_1.isFindElementType)(this.actions[0].getActionName())) {
16
16
  this.findAction = this.actions[0];
17
17
  }
18
18
  else {
@@ -30,10 +30,10 @@ class EnterTextStep extends MablStep_1.MablStep {
30
30
  toStepDescriptor() {
31
31
  const find = this.findAction.toDescriptor();
32
32
  switch (find.findType) {
33
- case mablscriptFind_1.FindType.FIND_FIRST:
34
- case mablscriptFind_1.FindType.FIND_LAST:
35
- case mablscriptFind_1.FindType.FIND_ANY:
36
- case mablscriptFind_1.FindType.FIND_ONE:
33
+ case domUtil_1.FindType.FIND_FIRST:
34
+ case domUtil_1.FindType.FIND_LAST:
35
+ case domUtil_1.FindType.FIND_ANY:
36
+ case domUtil_1.FindType.FIND_ONE:
37
37
  return {
38
38
  find,
39
39
  descriptorToActionMap: new Map().set(find, this.findAction),
@@ -56,7 +56,7 @@ class EnterTextStep extends MablStep_1.MablStep {
56
56
  if (this.description) {
57
57
  formatted[stepName].description = this.description;
58
58
  }
59
- if (step.find.findType === mablscriptFind_1.FindType.FIND_ONE) {
59
+ if (step.find.findType === domUtil_1.FindType.FIND_ONE) {
60
60
  formatted[stepName].selector = step.find.findTarget.selector;
61
61
  if ((_a = step.find.findTarget.auxiliaryDescriptors) === null || _a === void 0 ? void 0 : _a.length) {
62
62
  formatted[stepName].selectorAncestors =
@@ -71,7 +71,7 @@ class EnterTextStep extends MablStep_1.MablStep {
71
71
  return formatted;
72
72
  }
73
73
  produceSelIdeFormattedSteps(_stepIndex) {
74
- const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('type', this);
74
+ const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('type', this);
75
75
  seleniumStep.target = this.findAction.getSelIdeTarget();
76
76
  seleniumStep.value = this.substituteSeleniumVariable(this.text);
77
77
  return [seleniumStep];
@@ -4,7 +4,7 @@ exports.HoverStep = void 0;
4
4
  const FindAction_1 = require("../actions/FindAction");
5
5
  const SeleniumIdeStep_1 = require("./SeleniumIdeStep");
6
6
  const MablStep_1 = require("../MablStep");
7
- const mablscriptFind_1 = require("../../mablscriptFind");
7
+ const domUtil_1 = require("../../domUtil");
8
8
  class HoverStep extends MablStep_1.MablStep {
9
9
  constructor(name, args, actions) {
10
10
  super(name, args, actions);
@@ -22,10 +22,10 @@ class HoverStep extends MablStep_1.MablStep {
22
22
  toStepDescriptor() {
23
23
  const find = this.findAction.toDescriptor();
24
24
  switch (find.findType) {
25
- case mablscriptFind_1.FindType.FIND_FIRST:
26
- case mablscriptFind_1.FindType.FIND_LAST:
27
- case mablscriptFind_1.FindType.FIND_ANY:
28
- case mablscriptFind_1.FindType.FIND_ONE:
25
+ case domUtil_1.FindType.FIND_FIRST:
26
+ case domUtil_1.FindType.FIND_LAST:
27
+ case domUtil_1.FindType.FIND_ANY:
28
+ case domUtil_1.FindType.FIND_ONE:
29
29
  return {
30
30
  find,
31
31
  descriptorToActionMap: new Map().set(find, this.findAction),
@@ -46,7 +46,7 @@ class HoverStep extends MablStep_1.MablStep {
46
46
  return new HoverStep('hover', [], [FindAction_1.FindAction.findActionFromStepArgs(stepArgs)]);
47
47
  }
48
48
  produceSelIdeFormattedSteps(_stepIndex) {
49
- const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('mouseOver', this);
49
+ const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('mouseOver', this);
50
50
  seleniumStep.target = this.findAction.getSelIdeTarget();
51
51
  return [seleniumStep];
52
52
  }
@@ -7,7 +7,7 @@ const AssertStep_1 = require("./AssertStep");
7
7
  const FindAction_1 = require("../actions/FindAction");
8
8
  const MablStep_1 = require("../MablStep");
9
9
  const ExtractAction_1 = require("../actions/ExtractAction");
10
- const mablscriptFind_1 = require("../../mablscriptFind");
10
+ const domUtil_1 = require("../../domUtil");
11
11
  const JavaScriptAction_1 = require("../actions/JavaScriptAction");
12
12
  const GetUrlAction_1 = require("../actions/GetUrlAction");
13
13
  const ConditionDescriptor_1 = require("../types/ConditionDescriptor");
@@ -34,7 +34,8 @@ class IfConditionStep extends MablStep_1.MablStep {
34
34
  toStepDescriptor() {
35
35
  var _a, _b;
36
36
  const conditionDescriptor = this.conditionAction !== undefined
37
- ? (_a = this.conditionAction) === null || _a === void 0 ? void 0 : _a.conditionDescriptor : { conditionType: ConditionDescriptor_1.ConditionType.Truthy };
37
+ ? (_a = this.conditionAction) === null || _a === void 0 ? void 0 : _a.conditionDescriptor
38
+ : { conditionType: ConditionDescriptor_1.ConditionType.Truthy };
38
39
  const find = this.primaryAction.toDescriptor();
39
40
  return {
40
41
  find,
@@ -76,13 +77,13 @@ class IfConditionStep extends MablStep_1.MablStep {
76
77
  if (this.primaryAction instanceof FindAction_1.FindAction) {
77
78
  const find = this.primaryAction.toDescriptor();
78
79
  switch (find.findType) {
79
- case mablscriptFind_1.FindType.FIND_FIRST:
80
- case mablscriptFind_1.FindType.FIND_LAST:
81
- case mablscriptFind_1.FindType.FIND_ANY:
82
- case mablscriptFind_1.FindType.FIND_ALL:
80
+ case domUtil_1.FindType.FIND_FIRST:
81
+ case domUtil_1.FindType.FIND_LAST:
82
+ case domUtil_1.FindType.FIND_ANY:
83
+ case domUtil_1.FindType.FIND_ALL:
83
84
  details.selector = find.findTarget;
84
85
  break;
85
- case mablscriptFind_1.FindType.FIND_ONE:
86
+ case domUtil_1.FindType.FIND_ONE:
86
87
  details.selector = find.findTarget.selector;
87
88
  if (find.findOptions) {
88
89
  details.findOptions = find.findOptions;
@@ -17,7 +17,7 @@ class NavigateStep extends MablStep_1.MablStep {
17
17
  };
18
18
  }
19
19
  produceSelIdeFormattedSteps(_stepIndex) {
20
- const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('executeScript', this);
20
+ const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('executeScript', this);
21
21
  seleniumStep.target = 'window.location.reload()';
22
22
  return [seleniumStep];
23
23
  }
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ReleaseStep = void 0;
4
4
  const FindAction_1 = require("../actions/FindAction");
5
5
  const MablStep_1 = require("../MablStep");
6
- const mablscriptFind_1 = require("../../mablscriptFind");
6
+ const domUtil_1 = require("../../domUtil");
7
7
  const ActionsUtils_1 = require("./ActionsUtils");
8
8
  class ReleaseStep extends MablStep_1.MablStep {
9
9
  constructor(name, args, actions) {
@@ -30,10 +30,10 @@ class ReleaseStep extends MablStep_1.MablStep {
30
30
  toStepDescriptor() {
31
31
  const find = this.findAction.toDescriptor();
32
32
  switch (find.findType) {
33
- case mablscriptFind_1.FindType.FIND_FIRST:
34
- case mablscriptFind_1.FindType.FIND_LAST:
35
- case mablscriptFind_1.FindType.FIND_ANY:
36
- case mablscriptFind_1.FindType.FIND_ONE:
33
+ case domUtil_1.FindType.FIND_FIRST:
34
+ case domUtil_1.FindType.FIND_LAST:
35
+ case domUtil_1.FindType.FIND_ANY:
36
+ case domUtil_1.FindType.FIND_ONE:
37
37
  return {
38
38
  find,
39
39
  isHtml5: this.releaseArgs.isHtml5,
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SelectStep = void 0;
4
4
  const FindAction_1 = require("../actions/FindAction");
5
5
  const MablStep_1 = require("../MablStep");
6
- const mablscriptFind_1 = require("../../mablscriptFind");
6
+ const domUtil_1 = require("../../domUtil");
7
7
  class SelectStep extends MablStep_1.MablStep {
8
8
  constructor(name, args, actions) {
9
9
  super(name, args, actions);
@@ -26,10 +26,10 @@ class SelectStep extends MablStep_1.MablStep {
26
26
  const formatted = { ...selectOptionsCopy };
27
27
  const find = this.findAction.toDescriptor();
28
28
  switch (find.findType) {
29
- case mablscriptFind_1.FindType.FIND_FIRST:
30
- case mablscriptFind_1.FindType.FIND_LAST:
31
- case mablscriptFind_1.FindType.FIND_ANY:
32
- case mablscriptFind_1.FindType.FIND_ONE:
29
+ case domUtil_1.FindType.FIND_FIRST:
30
+ case domUtil_1.FindType.FIND_LAST:
31
+ case domUtil_1.FindType.FIND_ANY:
32
+ case domUtil_1.FindType.FIND_ONE:
33
33
  formatted.find = find;
34
34
  formatted.descriptorToActionMap = new Map().set(find, this.findAction);
35
35
  return formatted;
@@ -36,7 +36,7 @@ class SendHttpRequestStep extends MablStep_1.MablStep {
36
36
  return new SendHttpRequestStep('send_http_request', [formatted], []);
37
37
  }
38
38
  toMablscript() {
39
- const stepAsSource = MablStep_1.buildSourceRepresentationOfObject(this.sendRequest);
39
+ const stepAsSource = (0, MablStep_1.buildSourceRepresentationOfObject)(this.sendRequest);
40
40
  return `send_http_request(${stepAsSource})`;
41
41
  }
42
42
  }
@@ -4,7 +4,7 @@ exports.SendKeyStep = void 0;
4
4
  const FindAction_1 = require("../actions/FindAction");
5
5
  const SeleniumIdeStep_1 = require("./SeleniumIdeStep");
6
6
  const MablStep_1 = require("../MablStep");
7
- const mablscriptFind_1 = require("../../mablscriptFind");
7
+ const domUtil_1 = require("../../domUtil");
8
8
  const SendKeyStepDescriptor_1 = require("../types/SendKeyStepDescriptor");
9
9
  const STEP_NAME = 'SendKeys';
10
10
  const SEL_IDE_KEYS = {
@@ -35,7 +35,7 @@ class SendKeyStep extends MablStep_1.MablStep {
35
35
  if (this.actions.length !== 1 && !(this.actions[0] instanceof FindAction_1.FindAction)) {
36
36
  throw new Error(`${name} step should have one sub-action and it should be a find`);
37
37
  }
38
- if (mablscriptFind_1.isFindElementType(this.actions[0].getActionName())) {
38
+ if ((0, domUtil_1.isFindElementType)(this.actions[0].getActionName())) {
39
39
  this.findAction = this.actions[0];
40
40
  }
41
41
  else {
@@ -58,10 +58,10 @@ class SendKeyStep extends MablStep_1.MablStep {
58
58
  toStepDescriptor() {
59
59
  const find = this.findAction.toDescriptor();
60
60
  switch (find.findType) {
61
- case mablscriptFind_1.FindType.FIND_FIRST:
62
- case mablscriptFind_1.FindType.FIND_LAST:
63
- case mablscriptFind_1.FindType.FIND_ANY:
64
- case mablscriptFind_1.FindType.FIND_ONE:
61
+ case domUtil_1.FindType.FIND_FIRST:
62
+ case domUtil_1.FindType.FIND_LAST:
63
+ case domUtil_1.FindType.FIND_ANY:
64
+ case domUtil_1.FindType.FIND_ONE:
65
65
  return {
66
66
  find,
67
67
  keys: this.keys,
@@ -81,7 +81,7 @@ class SendKeyStep extends MablStep_1.MablStep {
81
81
  };
82
82
  }
83
83
  produceSelIdeFormattedSteps() {
84
- const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('sendKeys', this);
84
+ const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('sendKeys', this);
85
85
  seleniumStep.target = this.findAction.getSelIdeTarget();
86
86
  seleniumStep.value = this.keys
87
87
  .map((keyPress) => {
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SetFilesStep = void 0;
4
4
  const FindAction_1 = require("../actions/FindAction");
5
5
  const MablStep_1 = require("../MablStep");
6
- const mablscriptFind_1 = require("../../mablscriptFind");
6
+ const domUtil_1 = require("../../domUtil");
7
7
  class SetFilesStep extends MablStep_1.MablStep {
8
8
  constructor(name, args, actions) {
9
9
  super(name, args, actions);
@@ -24,10 +24,10 @@ class SetFilesStep extends MablStep_1.MablStep {
24
24
  formatted.files = this.files;
25
25
  const find = this.findAction.toDescriptor();
26
26
  switch (find.findType) {
27
- case mablscriptFind_1.FindType.FIND_FIRST:
28
- case mablscriptFind_1.FindType.FIND_LAST:
29
- case mablscriptFind_1.FindType.FIND_ANY:
30
- case mablscriptFind_1.FindType.FIND_ONE:
27
+ case domUtil_1.FindType.FIND_FIRST:
28
+ case domUtil_1.FindType.FIND_LAST:
29
+ case domUtil_1.FindType.FIND_ANY:
30
+ case domUtil_1.FindType.FIND_ONE:
31
31
  formatted.find = find;
32
32
  formatted.descriptorToActionMap = new Map().set(find, this.findAction);
33
33
  return formatted;
@@ -16,7 +16,7 @@ class SetViewportStep extends MablStep_1.MablStep {
16
16
  return { size: this.size };
17
17
  }
18
18
  produceSelIdeFormattedSteps(_stepIndex) {
19
- const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('setWindowSize', this);
19
+ const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('setWindowSize', this);
20
20
  const width = this.size.width || 1920;
21
21
  const height = this.size.height || 1080;
22
22
  seleniumStep.target = this.substituteSeleniumVariable(`${width}x${height}`);
@@ -5,7 +5,7 @@ const FindAction_1 = require("../actions/FindAction");
5
5
  const SeleniumIdeStep_1 = require("./SeleniumIdeStep");
6
6
  const MablStep_1 = require("../MablStep");
7
7
  const SwitchContextStepDescriptor_1 = require("../types/SwitchContextStepDescriptor");
8
- const mablscriptFind_1 = require("../../mablscriptFind");
8
+ const domUtil_1 = require("../../domUtil");
9
9
  class SwitchContextStep extends MablStep_1.MablStep {
10
10
  constructor(name, args, actions) {
11
11
  super(name, args, actions);
@@ -28,7 +28,7 @@ class SwitchContextStep extends MablStep_1.MablStep {
28
28
  this.findAction.setActionSourceIndexInStep(this.actions[0].actionSourceIndexInStep);
29
29
  }
30
30
  const findDescriptor = this.findAction.toDescriptor();
31
- if (findDescriptor.findType === mablscriptFind_1.FindType.FIND_TAB) {
31
+ if (findDescriptor.findType === domUtil_1.FindType.FIND_TAB) {
32
32
  this.switch = {
33
33
  tab: findDescriptor,
34
34
  find: findDescriptor,
@@ -37,7 +37,7 @@ class SwitchContextStep extends MablStep_1.MablStep {
37
37
  Object.freeze(this.switch);
38
38
  return;
39
39
  }
40
- if (findDescriptor.findType === mablscriptFind_1.FindType.FIND_ONE) {
40
+ if (findDescriptor.findType === domUtil_1.FindType.FIND_ONE) {
41
41
  this.switch = {
42
42
  frame: findDescriptor,
43
43
  find: findDescriptor,
@@ -73,37 +73,37 @@ class SwitchContextStep extends MablStep_1.MablStep {
73
73
  if (this.description) {
74
74
  formatted[stepName].description = this.description;
75
75
  }
76
- if (SwitchContextStepDescriptor_1.isSwitchTab(step)) {
76
+ if ((0, SwitchContextStepDescriptor_1.isSwitchTab)(step)) {
77
77
  formatted[stepName].findType = 'FindTab';
78
78
  formatted[stepName].selector = step.tab.findTarget;
79
79
  }
80
- if (SwitchContextStepDescriptor_1.isSwitchFrame(step)) {
80
+ if ((0, SwitchContextStepDescriptor_1.isSwitchFrame)(step)) {
81
81
  formatted[stepName].selector = step.frame.findTarget.selector;
82
82
  if ((_a = step.frame.findTarget.auxiliaryDescriptors) === null || _a === void 0 ? void 0 : _a.length) {
83
83
  formatted[stepName].selectorAncestors =
84
84
  step.frame.findTarget.auxiliaryDescriptors.map((descriptor) => descriptor.selector);
85
85
  }
86
86
  }
87
- if (SwitchContextStepDescriptor_1.isSwitchRoot(step) && step.frame === 'root') {
87
+ if ((0, SwitchContextStepDescriptor_1.isSwitchRoot)(step) && step.frame === 'root') {
88
88
  formatted[stepName].switch = 'root';
89
89
  }
90
90
  return formatted;
91
91
  }
92
92
  produceSelIdeFormattedSteps(_stepIndex) {
93
- if (SwitchContextStepDescriptor_1.isSwitchRoot(this.switch) && this.switch.frame === 'root') {
94
- const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('selectWindow', this);
93
+ if ((0, SwitchContextStepDescriptor_1.isSwitchRoot)(this.switch) && this.switch.frame === 'root') {
94
+ const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('selectWindow', this);
95
95
  seleniumStep.target = 'window=0';
96
96
  return [seleniumStep];
97
97
  }
98
- else if (SwitchContextStepDescriptor_1.isSwitchTab(this.switch)) {
99
- const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('selectWindow', this);
98
+ else if ((0, SwitchContextStepDescriptor_1.isSwitchTab)(this.switch)) {
99
+ const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('selectWindow', this);
100
100
  seleniumStep.target =
101
101
  this.switch.tab.findTarget === 'initial'
102
102
  ? 'tab=0'
103
103
  : `title="${this.switch.tab.findTarget.title}"`;
104
104
  return [seleniumStep];
105
105
  }
106
- const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('selectFrame', this);
106
+ const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('selectFrame', this);
107
107
  if (this.findAction) {
108
108
  seleniumStep.target = this.findAction.getSelIdeTarget();
109
109
  }
@@ -117,7 +117,7 @@ class SwitchContextStep extends MablStep_1.MablStep {
117
117
  }
118
118
  toMablscript() {
119
119
  var _a;
120
- if (SwitchContextStepDescriptor_1.isSwitchRoot(this.switch) && this.switch.frame === 'root') {
120
+ if ((0, SwitchContextStepDescriptor_1.isSwitchRoot)(this.switch) && this.switch.frame === 'root') {
121
121
  return 'switch_context_to("root")';
122
122
  }
123
123
  return `${(_a = this.findAction) === null || _a === void 0 ? void 0 : _a.toMablscript()}.switch_context_to()`;
@@ -20,7 +20,7 @@ class VisitUrlStep extends MablStep_1.MablStep {
20
20
  };
21
21
  }
22
22
  produceSelIdeFormattedSteps(_stepIndex) {
23
- const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('open', this);
23
+ const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('open', this);
24
24
  seleniumStep.target = this.substituteSeleniumVariable(this.url);
25
25
  return [seleniumStep];
26
26
  }
@@ -17,7 +17,7 @@ class WaitStep extends MablStep_1.MablStep {
17
17
  };
18
18
  }
19
19
  produceSelIdeFormattedSteps(_stepIndex) {
20
- const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('pause', this);
20
+ const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('pause', this);
21
21
  seleniumStep.target = `${this.milliseconds}`;
22
22
  return [seleniumStep];
23
23
  }
@@ -2,11 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WaitUntilStep = void 0;
4
4
  const MablStep_1 = require("../MablStep");
5
- const mablscriptFind_1 = require("../../mablscriptFind");
5
+ const domUtil_1 = require("../../domUtil");
6
6
  class WaitUntilStep extends MablStep_1.MablStep {
7
7
  constructor(name, args, actions) {
8
8
  super(name, args, actions);
9
- if (mablscriptFind_1.isFindElementType(this.actions[0].getActionName())) {
9
+ if ((0, domUtil_1.isFindElementType)(this.actions[0].getActionName())) {
10
10
  this.findAction = this.actions[0];
11
11
  }
12
12
  else {
@@ -19,7 +19,7 @@ class WaitUntilStep extends MablStep_1.MablStep {
19
19
  toStepDescriptor() {
20
20
  const find = this.findAction.toDescriptor();
21
21
  switch (find.findType) {
22
- case mablscriptFind_1.FindType.FIND_ONE:
22
+ case domUtil_1.FindType.FIND_ONE:
23
23
  return {
24
24
  find,
25
25
  descriptorToActionMap: new Map().set(find, this.findAction),
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -6,7 +6,7 @@ function isVariableNamespace(value) {
6
6
  return (value &&
7
7
  typeof value === 'object' &&
8
8
  !Array.isArray(value) &&
9
- VariableDataType_1.isSimpleObject(value) &&
9
+ (0, VariableDataType_1.isSimpleObject)(value) &&
10
10
  Object.keys(value).every((key) => key) &&
11
11
  Object.values(value).every(VariableDataType_1.isVariableDataType));
12
12
  }