feat: set width to 900

This commit is contained in:
karishmas6
2024-10-19 20:37:48 +05:30
parent d7ebae2887
commit 87a0d83172

View File

@@ -92,7 +92,7 @@ export class RemoteBrowser {
this.browser = <Browser>(await options.browser.launch(options.launchOptions)); this.browser = <Browser>(await options.browser.launch(options.launchOptions));
const context = await this.browser.newContext( const context = await this.browser.newContext(
{ {
viewport: { height: 500, width: 900 }, viewport: { height: 400, width: 900 },
// recordVideo: { dir: 'videos/' } // recordVideo: { dir: 'videos/' }
} }
); );
@@ -280,7 +280,7 @@ export class RemoteBrowser {
if (page) { if (page) {
await this.stopScreencast(); await this.stopScreencast();
this.currentPage = page; this.currentPage = page;
await this.currentPage.setViewportSize({ height: 500, width: 900 }) await this.currentPage.setViewportSize({ height: 400, width: 900 })
this.client = await this.currentPage.context().newCDPSession(this.currentPage); this.client = await this.currentPage.context().newCDPSession(this.currentPage);
this.socket.emit('urlChanged', this.currentPage.url()); this.socket.emit('urlChanged', this.currentPage.url());
await this.makeAndEmitScreenshot(); await this.makeAndEmitScreenshot();