@dev-blinq/cucumber_client 1.0.1713-dev → 1.0.1715-dev
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.
|
@@ -293,6 +293,9 @@ async function BVTRecorderInit({ envName, projectDir, roomId, TOKEN, socket = nu
|
|
|
293
293
|
"recorderWindow.deleteCommandFromStepCode": async (input) => {
|
|
294
294
|
return await recorder.deleteCommandFromStepCode(input);
|
|
295
295
|
},
|
|
296
|
+
"recorderWindow.generateLocatorSummaries": async (input) => {
|
|
297
|
+
return await recorder.generateLocatorSummaries(input);
|
|
298
|
+
}
|
|
296
299
|
});
|
|
297
300
|
socket.on("targetBrowser.command.event", async (input) => {
|
|
298
301
|
return recorder.onAction(input);
|
|
@@ -1229,6 +1229,13 @@ export class BVTRecorder {
|
|
|
1229
1229
|
datasets,
|
|
1230
1230
|
};
|
|
1231
1231
|
}
|
|
1232
|
+
async generateLocatorSummaries({ allStrategyLocators, element_name }) {
|
|
1233
|
+
const input = {
|
|
1234
|
+
[element_name ?? "element"]: allStrategyLocators
|
|
1235
|
+
};
|
|
1236
|
+
const result = await this.namesService.generateLocatorDescriptions({ locatorsObj: input });
|
|
1237
|
+
return result;
|
|
1238
|
+
}
|
|
1232
1239
|
async findRelatedTextInAllFrames({ searchString, climb, contextText, params, }) {
|
|
1233
1240
|
if (searchString.length === 0)
|
|
1234
1241
|
return -1;
|
|
@@ -147,6 +147,25 @@ export class NamesService {
|
|
|
147
147
|
}
|
|
148
148
|
return result.data;
|
|
149
149
|
}
|
|
150
|
+
async generateLocatorDescriptions({ locatorsObj }) {
|
|
151
|
+
const url = `${getRunsServiceBaseURL()}/locate/generate_locator_summaries`;
|
|
152
|
+
const result = await axiosClient({
|
|
153
|
+
url,
|
|
154
|
+
method: "POST",
|
|
155
|
+
data: locatorsObj,
|
|
156
|
+
headers: {
|
|
157
|
+
Authorization: `Bearer ${this.TOKEN}`,
|
|
158
|
+
"X-Source": "recorder",
|
|
159
|
+
},
|
|
160
|
+
});
|
|
161
|
+
if (result.status !== 200) {
|
|
162
|
+
throw new Error("Error while generating locator descriptions");
|
|
163
|
+
}
|
|
164
|
+
if (!result.data.status) {
|
|
165
|
+
throw new Error(result.data.error || "Error while generating locator descriptions");
|
|
166
|
+
}
|
|
167
|
+
return result.data.locatorsObj;
|
|
168
|
+
}
|
|
150
169
|
}
|
|
151
170
|
export class PublishService {
|
|
152
171
|
TOKEN;
|