@mablhq/mabl-cli 1.48.7 → 1.48.26
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/api/mablApiClient.js +11 -0
- package/browserEngines/chromiumBrowserEngine.js +3 -0
- package/browserEngines/firefoxBrowserEngine.js +8 -2
- package/browserEngines/unsupportedBrowserEngine.js +3 -0
- package/browserEngines/webkitBrowerEngine.js +11 -0
- package/browserLauncher/elementHandle.js +10 -1
- package/browserLauncher/playwrightBrowserLauncher/chromium/chromiumElementHandleDelegate.js +63 -0
- package/browserLauncher/playwrightBrowserLauncher/chromium/chromiumPageDelegate.js +29 -10
- package/browserLauncher/playwrightBrowserLauncher/firefox/firefoxBrowserDelegate.js +36 -0
- package/browserLauncher/playwrightBrowserLauncher/firefox/firefoxElementHandleDelegate.js +4 -0
- package/browserLauncher/playwrightBrowserLauncher/nonChromium/nonChromiumAbstractBrowserDelegate.js +0 -35
- package/browserLauncher/playwrightBrowserLauncher/nonChromium/nonChromiumAbstractElementHandleDelegate.js +4 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightDom.js +35 -52
- package/browserLauncher/playwrightBrowserLauncher/webkit/webkitBrowserDelegate.js +36 -0
- package/browserLauncher/playwrightBrowserLauncher/webkit/webkitElementHandleDelegate.js +9 -0
- package/commands/constants.js +5 -2
- package/commands/datatables/datatables_cmds/create.js +148 -0
- package/commands/datatables/datatables_cmds/export.js +1 -2
- package/commands/tests/testsUtil.js +19 -1
- package/commands/tests/tests_cmds/run.js +1 -15
- package/execution/index.js +1 -1
- package/index.d.ts +9 -0
- package/mablApi/index.js +1 -1
- package/mablscript/importer.js +2 -0
- package/mablscript/steps/DoubleClickStep.js +1 -1
- package/mablscript/steps/RightClickStep.js +57 -0
- package/mablscriptFind/index.js +1 -1
- package/package.json +2 -1
- package/popupDismissal/index.js +7 -2
- package/resources/mablFind.js +1 -1
- package/resources/popupDismissal.js +1 -1
- package/util/asyncUtil.js +1 -1
- package/util/browserTestUtils.js +2 -2
- package/util/clickUtil.js +24 -14
- package/util/csvUtil.js +6 -1
package/mablscript/importer.js
CHANGED
|
@@ -51,6 +51,7 @@ const ReleaseStep_1 = require("./steps/ReleaseStep");
|
|
|
51
51
|
const CountAction_1 = require("./actions/CountAction");
|
|
52
52
|
const AccessibilityCheck_1 = require("./steps/AccessibilityCheck");
|
|
53
53
|
const EvaluateFlowStep_1 = require("./steps/EvaluateFlowStep");
|
|
54
|
+
const RightClickStep_1 = require("./steps/RightClickStep");
|
|
54
55
|
const ActionTypes = [
|
|
55
56
|
AwaitDownloadAction_1.AwaitDownloadAction,
|
|
56
57
|
AwaitPDFDownloadAction_1.AwaitPDFDownloadAction,
|
|
@@ -90,6 +91,7 @@ const StepTypes = [
|
|
|
90
91
|
OpenEmailStep_1.OpenEmailStep,
|
|
91
92
|
ReleaseStep_1.ReleaseStep,
|
|
92
93
|
RemoveCookieStep_1.RemoveCookieStep,
|
|
94
|
+
RightClickStep_1.RightClickStep,
|
|
93
95
|
SelectStep_1.SelectStep,
|
|
94
96
|
SendHttpRequestStep_1.SendHttpRequestStep,
|
|
95
97
|
SetCookieStep_1.SetCookieStep,
|
|
@@ -32,7 +32,7 @@ class DoubleClickStep extends MablStep_1.MablStep {
|
|
|
32
32
|
descriptorToActionMap: new Map().set(find, this.findAction),
|
|
33
33
|
};
|
|
34
34
|
default:
|
|
35
|
-
throw new Error(
|
|
35
|
+
throw new Error(`Error generating step descriptor for ${this.getStepName()}: Unexpected find type ${find.findType}`);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
getFormattedStep(_fullLocatorsOn) {
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RightClickStep = void 0;
|
|
4
|
+
const FindAction_1 = require("../actions/FindAction");
|
|
5
|
+
const SeleniumIdeStep_1 = require("./SeleniumIdeStep");
|
|
6
|
+
const MablStep_1 = require("../MablStep");
|
|
7
|
+
const domUtil_1 = require("../../domUtil");
|
|
8
|
+
const ActionsUtils_1 = require("./ActionsUtils");
|
|
9
|
+
class RightClickStep extends MablStep_1.MablStep {
|
|
10
|
+
constructor(name, args, actions) {
|
|
11
|
+
super(name, args, actions);
|
|
12
|
+
this.findAction = ActionsUtils_1.ActionsUtils.validateSingleFindAction(this.actions);
|
|
13
|
+
}
|
|
14
|
+
getStepName() {
|
|
15
|
+
return 'RightClick';
|
|
16
|
+
}
|
|
17
|
+
toStepDescriptor() {
|
|
18
|
+
const find = this.findAction.toDescriptor();
|
|
19
|
+
switch (find.findType) {
|
|
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
|
+
return {
|
|
25
|
+
find,
|
|
26
|
+
descriptorToActionMap: new Map().set(find, this.findAction),
|
|
27
|
+
};
|
|
28
|
+
default:
|
|
29
|
+
throw new Error(`Error generating step descriptor for ${this.getStepName()}: Unexpected find type ${find.findType}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
getFormattedStep(_fullLocatorsOn) {
|
|
33
|
+
return {
|
|
34
|
+
RightClick: {
|
|
35
|
+
...super.annotationsAsYml(),
|
|
36
|
+
...this.findAction.toYaml(),
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
produceSelIdeFormattedSteps(_stepIndex) {
|
|
41
|
+
const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('contextClick', this);
|
|
42
|
+
seleniumStep.target = this.findAction.getSelIdeTarget();
|
|
43
|
+
return [seleniumStep];
|
|
44
|
+
}
|
|
45
|
+
static fromYaml(_stepName, stepArgs) {
|
|
46
|
+
return new RightClickStep('right_click', [], [FindAction_1.FindAction.findActionFromStepArgs(stepArgs)]);
|
|
47
|
+
}
|
|
48
|
+
toMablscript() {
|
|
49
|
+
return `${this.findAction.toMablscript()}.right_click()`;
|
|
50
|
+
}
|
|
51
|
+
getInputVariables() {
|
|
52
|
+
return this.findAction.getInputVariables();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.RightClickStep = RightClickStep;
|
|
56
|
+
RightClickStep.mablScriptStepNames = ['right_click'];
|
|
57
|
+
RightClickStep.yamlMablScriptNames = ['RightClick'];
|