@dev-blinq/cucumber_client 1.0.1601-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.
|
@@ -206,16 +206,7 @@ export class BVTRecorder {
|
|
|
206
206
|
this.networkEventsFolder = path.join(tmpdir(), "blinq_network_events");
|
|
207
207
|
this.tempProjectFolder = `${tmpdir()}/bvt_temp_project_${Math.floor(Math.random() * 1000000)}`;
|
|
208
208
|
this.tempSnapshotsFolder = path.join(this.tempProjectFolder, "data/snapshots");
|
|
209
|
-
|
|
210
|
-
this.browserEmitter = new RemoteBrowserService({
|
|
211
|
-
CDP_CONNECT_URL: `http://localhost:${this.#remoteDebuggerPort}`,
|
|
212
|
-
context: this.context,
|
|
213
|
-
});
|
|
214
|
-
this.browserEmitter.on(this.events.browserStateSync, (state) => {
|
|
215
|
-
// this.page = this.browserEmitter.getSelectedPage();
|
|
216
|
-
this.sendEvent(this.events.browserStateSync, state);
|
|
217
|
-
});
|
|
218
|
-
}
|
|
209
|
+
|
|
219
210
|
if (existsSync(this.networkEventsFolder)) {
|
|
220
211
|
rmSync(this.networkEventsFolder, { recursive: true, force: true });
|
|
221
212
|
}
|
|
@@ -382,6 +373,16 @@ export class BVTRecorder {
|
|
|
382
373
|
this.web.tryAllStrategies = true;
|
|
383
374
|
this.page = bvtContext.page;
|
|
384
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
|
+
}
|
|
385
386
|
|
|
386
387
|
this.lastKnownUrlPath = this._updateUrlPath();
|
|
387
388
|
const browser = await this.context.browser();
|