简体   繁体   中英

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

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') .

Eg 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!

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.
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',
            }
        }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM