@dev-blinq/cucumber_client 1.0.1458-stage → 1.0.1459-stage
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);
|
|
@@ -1227,6 +1227,13 @@ export class BVTRecorder {
|
|
|
1227
1227
|
datasets,
|
|
1228
1228
|
};
|
|
1229
1229
|
}
|
|
1230
|
+
async generateLocatorSummaries({ allStrategyLocators, element_name }) {
|
|
1231
|
+
const input = {
|
|
1232
|
+
[element_name ?? "element"]: allStrategyLocators
|
|
1233
|
+
};
|
|
1234
|
+
const result = await this.namesService.generateLocatorDescriptions({ locatorsObj: input });
|
|
1235
|
+
return result[element_name ?? "element"];
|
|
1236
|
+
}
|
|
1230
1237
|
async findRelatedTextInAllFrames({ searchString, climb, contextText, params, }) {
|
|
1231
1238
|
if (searchString.length === 0)
|
|
1232
1239
|
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;
|