@dev-blinq/cucumber_client 1.0.1600-dev → 1.0.1602-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.
|
@@ -204,7 +204,6 @@ export class BVTRecorder {
|
|
|
204
204
|
this.shouldTakeScreenshot = true;
|
|
205
205
|
this.watcher = null;
|
|
206
206
|
this.networkEventsFolder = path.join(tmpdir(), "blinq_network_events");
|
|
207
|
-
|
|
208
207
|
this.tempProjectFolder = `${tmpdir()}/bvt_temp_project_${Math.floor(Math.random() * 1000000)}`;
|
|
209
208
|
this.tempSnapshotsFolder = path.join(this.tempProjectFolder, "data/snapshots");
|
|
210
209
|
|
|
@@ -374,6 +373,16 @@ export class BVTRecorder {
|
|
|
374
373
|
this.web.tryAllStrategies = true;
|
|
375
374
|
this.page = bvtContext.page;
|
|
376
375
|
this.pageSet.add(this.page);
|
|
376
|
+
if (process.env.REMOTE_RECORDER === "true") {
|
|
377
|
+
this.browserEmitter = new RemoteBrowserService({
|
|
378
|
+
CDP_CONNECT_URL: `http://localhost:${this.#remoteDebuggerPort}`,
|
|
379
|
+
context: this.context,
|
|
380
|
+
});
|
|
381
|
+
this.browserEmitter.on(this.events.browserStateSync, (state) => {
|
|
382
|
+
// this.page = this.browserEmitter.getSelectedPage();
|
|
383
|
+
this.sendEvent(this.events.browserStateSync, state);
|
|
384
|
+
});
|
|
385
|
+
}
|
|
377
386
|
|
|
378
387
|
this.lastKnownUrlPath = this._updateUrlPath();
|
|
379
388
|
const browser = await this.context.browser();
|
|
@@ -675,16 +684,6 @@ export class BVTRecorder {
|
|
|
675
684
|
await this._initBrowser({ url });
|
|
676
685
|
await this._openTab({ url });
|
|
677
686
|
process.env.TEMP_RUN = true;
|
|
678
|
-
if (process.env.REMOTE_RECORDER === "true") {
|
|
679
|
-
this.browserEmitter = new RemoteBrowserService({
|
|
680
|
-
CDP_CONNECT_URL: `http://localhost:${this.#remoteDebuggerPort}`,
|
|
681
|
-
context: this.context,
|
|
682
|
-
});
|
|
683
|
-
this.browserEmitter.on(this.events.browserStateSync, (state) => {
|
|
684
|
-
// this.page = this.browserEmitter.getSelectedPage();
|
|
685
|
-
this.sendEvent(this.events.browserStateSync, state);
|
|
686
|
-
});
|
|
687
|
-
}
|
|
688
687
|
}
|
|
689
688
|
overlayLocators(event) {
|
|
690
689
|
let locatorsResults = [...event.locators];
|
|
@@ -831,10 +830,6 @@ export class BVTRecorder {
|
|
|
831
830
|
this.previousHistoryLength = null;
|
|
832
831
|
this.previousUrl = null;
|
|
833
832
|
this.previousEntries = null;
|
|
834
|
-
if (this.browserEmitter) {
|
|
835
|
-
this.browserEmitter.destroy();
|
|
836
|
-
this.browserEmitter = null; // Clear the reference
|
|
837
|
-
}
|
|
838
833
|
await closeContext();
|
|
839
834
|
this.pageSet.clear();
|
|
840
835
|
}
|