How to use the gemini-core.ScreenShooter.create function in gemini-core

To help you get started, we’ve selected a few gemini-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gemini-testing / hermione / lib / browser / commands / assert-view / index.js View on Github external
module.exports = (browser) => {
    const screenShooter = ScreenShooter.create(browser);
    const {publicAPI: session, config} = browser;
    const {tolerance, antialiasingTolerance, compareOpts, screenshotDelay} = config;

    const {handleNoRefImage, handleImageDiff} = getCaptureProcessors();

    session.addCommand('assertView', async (state, selectors, opts = {}) => {
        opts = _.defaults(opts, {
            ignoreElements: [],
            tolerance,
            allowViewportOverflow: false,
            screenshotDelay
        });

        const {hermioneCtx} = session.executionContext;
        hermioneCtx.assertViewResults = hermioneCtx.assertViewResults || AssertViewResults.create();
github gemini-testing / gemini / lib / capture-session.js View on Github external
constructor(browser) {
        this.browser = browser;
        this.log = debug('gemini:capture:' + this.browser.id);

        this._postActions = [];

        this._screenShooter = ScreenShooter.create(browser);
    }