@mablhq/mabl-cli 1.51.6 → 1.52.2
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/domUtil/index.js +1 -1
- package/execution/index.js +1 -1
- package/mablscript/actions/FindAction.js +10 -13
- package/mablscriptFind/index.js +1 -1
- package/package.json +1 -1
- package/resources/mablFind.js +1 -1
|
@@ -51,20 +51,17 @@ class FindAction extends MablAction_1.MablAction {
|
|
|
51
51
|
case domUtil_1.FindType.FIND_LAST:
|
|
52
52
|
case domUtil_1.FindType.FIND_ANY:
|
|
53
53
|
case domUtil_1.FindType.FIND_ALL: {
|
|
54
|
-
const [primarySelector,
|
|
54
|
+
const [primarySelector, foundElementSelectors, findOptions] = this.getActionArgs();
|
|
55
55
|
if (!(0, domUtil_1.isCssSelector)(primarySelector) &&
|
|
56
56
|
!(0, domUtil_1.isXPathSelector)(primarySelector)) {
|
|
57
57
|
this.isValid = false;
|
|
58
58
|
}
|
|
59
59
|
this.findDescriptor = {
|
|
60
|
-
|
|
60
|
+
findOptions,
|
|
61
61
|
findTarget: primarySelector,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
uuid: primarySelector.uuid,
|
|
66
|
-
},
|
|
67
|
-
hints: findOptions === null || findOptions === void 0 ? void 0 : findOptions.hints,
|
|
62
|
+
findType,
|
|
63
|
+
foundElementSelectors,
|
|
64
|
+
primarySelectors: primarySelector,
|
|
68
65
|
};
|
|
69
66
|
break;
|
|
70
67
|
}
|
|
@@ -196,10 +193,10 @@ class FindAction extends MablAction_1.MablAction {
|
|
|
196
193
|
else {
|
|
197
194
|
foundElementSelectors = '{selector_type: "element"}';
|
|
198
195
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
196
|
+
const options = buildFindOptionsString(find.findOptions);
|
|
197
|
+
args = [selector, foundElementSelectors, options]
|
|
198
|
+
.filter(Boolean)
|
|
199
|
+
.join(', ');
|
|
203
200
|
if (find.findType === domUtil_1.FindType.FIND_ANY) {
|
|
204
201
|
action = domUtil_1.FindType.FIND_FIRST;
|
|
205
202
|
}
|
|
@@ -250,7 +247,7 @@ FindAction.yamlMablScriptNames = [
|
|
|
250
247
|
];
|
|
251
248
|
function buildFindOptionsString(findOptions) {
|
|
252
249
|
if (!findOptions) {
|
|
253
|
-
return
|
|
250
|
+
return undefined;
|
|
254
251
|
}
|
|
255
252
|
return JSON.stringify(findOptions);
|
|
256
253
|
}
|