taktakpeops / jest-environment-browserstack

A Jest environment for using Browserstack and Browserstack-Local with Webdriver-manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there a way to take a screenshot of the the entire page?

tchia04 opened this issue · comments

In puppeteer, I can do something like this

browser = await puppeteer.launch({
  headless: HEADLESS,
  dumpio: true,
  executablePath: process.env.CHROME_BIN || null,
  args: ['--single-process','--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage', '--disable-gpu', '--disable-software-rasterizer']
});

await page.setViewport({...options, height: Math.min(height, 20000)});

So when I take a screenshot, it captures everything without having to scroll to the end.

Can something similar be done with jest-environment-browserstack?

Hello,

The module allows you to override the capabilties you use to create your session in Browserstack inside of your spec files.

By specifying the following arguments for Google Chrome, you can hide the address bar.

{
      browserName: 'chrome',
      'goog:chromeOptions': {
        args: [`--app=${myUrl}`]
      },
},

In this case, Chrome will open as web-app without the address bar nor the tabs.

@tchia04, could you please provide some feedback so we can close the issue?

Closing the issue since no feedback was provided