Is it possible to test scroll in using Gemini by Yandex?

285 Views Asked by At

Does anyone use Gemini by Yandex for testing css regression?

I faced with the following problem: need to test scroll in some page, but as I know, gemini capture whole page and show only that part which you set by adding .setCaptureElements('someElement').

E.g. I set capture element as html (which has 100% height) and my content is very huge, but gemini screenshot show up only cut over part of page without possibility to scroll cause page hasn't scroll as such...

Maybe some of you faced with same problem and have cool solution? Thanks!

2

There are 2 best solutions below

0
On

I had the necessity to make a screenshot of the page that has scrolling. I need the screenshot of the whole page and made changes which let me did it:

  1. Used .setCaptureElements only for the element where is scrolling exist (not the whole body).
  2. Added line compositeImage: true in configuration file.
0
On
gemini.suite('App-Name', function(test) {
        test.setUrl('/')
            .setCaptureElements('body')
            .capture('Full Page', (actions) => actions.wait(2000))
    });

//You can also use
.setCaptureElements('html') , if .setCaptureElements('body') is not working perfect for you.

You need to add this code in .gemini.js
browsers: {
        'chrome-desktop': {
            desiredCapabilities: {
                browserName: 'chrome',
                compositeImage: true,
                screenshotMode: 'fullpage',
            }
        }