Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 23 13:20

    wswebcreation on master

    chore: update baseline Merge remote-tracking branch 'o… (compare)

  • Jan 07 11:07

    wswebcreation on master

    Update README.md (compare)

  • Jan 04 08:55

    wswebcreation on master

    Fix ChromeDriver issue for Chro… (compare)

  • Dec 31 2019 12:45

    wswebcreation on master

    Update README.md (compare)

  • Dec 30 2019 13:00

    wswebcreation on master

    Update README.md (compare)

  • Dec 25 2019 20:51

    wswebcreation on master

    chore: add more browsers and iO… (compare)

  • Dec 25 2019 08:19

    wswebcreation on master

    chore: update to node 12 (compare)

  • Dec 25 2019 08:17

    wswebcreation on master

    chore: add android 9 again (compare)

  • Dec 25 2019 08:03

    wswebcreation on master

    chore: update dependencies and … (compare)

  • Dec 08 2019 09:00

    wswebcreation on v1.9.0

    (compare)

  • Dec 08 2019 09:00

    wswebcreation on master

    1.9.0 (compare)

  • Dec 08 2019 08:59

    wswebcreation on master

    feat: update core with latest v… (compare)

  • Dec 08 2019 08:48
    wswebcreation commented #15
  • Dec 08 2019 08:48
    wswebcreation labeled #15
  • Dec 08 2019 08:48
    wswebcreation assigned #15
  • Dec 08 2019 08:48
    wswebcreation closed #16
  • Dec 08 2019 08:48
    wswebcreation commented #16
  • Nov 11 2019 16:24
    stale[bot] closed #7
  • Nov 06 2019 09:34
    wswebcreation commented #18
  • Nov 06 2019 09:34
    wswebcreation labeled #18
Wim Selles
@wswebcreation
Then you didn't implement the service correctly, please check the docs and also verify that you don't have a duplicate services on your config which overwrites the previous one
Satheesh Kumar
@503649_gitlab
I have created a wdio.conf.js file and pasted the configurations which are provided in the docs. But still facing the issue.
Is there a specific location where I need to place the cone file
conf
Wim Selles
@wswebcreation
Nope, can you paste you conf here I proper markdown?
Satheesh Kumar
@503649_gitlab

Hi,

Can we do image-comparison for iOS mobile Application which will be tested in iOS Simulators or devices

Wim Selles
@wswebcreation
Uhh, you mean a native app?
Or Safari?
Satheesh Kumar
@503649_gitlab
Native app
Wim Selles
@wswebcreation
This one is specifically for native apps
Satheesh Kumar
@503649_gitlab
Thank you. Will try it out
Satheesh Kumar
@503649_gitlab
I am getting TypeError: client.saveElement is not a function error
Wim Selles
@wswebcreation
Are you using TypeScript? Because the module doesn't export the typings
You need to make them yourself
Satheesh Kumar
@503649_gitlab
yes, I am using typescript
How can I import the typings??
Wim Selles
@wswebcreation
I don't know :wink:
You just need to make them yourself
Satheesh Kumar
@503649_gitlab
Ok, thank you
Kiran Mistry
@Kiran-Mistry
Is it possible to set multiple viewports in one test? Or would you have to set up different tests for each viewport
Wim Selles
@wswebcreation

@Kiran-Mistry

You need to change the viewport through WDIO and then create a new screenshot each time

You can do that in 1 test
anna_qs
@annaqs7_twitter

Hi, When I am trying to build project with wdio-image-comparison-service, I've got error message

Package pixman-1 was not found in the pkg-config search path. Perhaps you should add the directory containing `pixman-1.pc' to the PKG_CONFIG_PATH environment variable No package 'pixman-1' found gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 1. while trying to load binding.gyp

does anybody have that issue?

Wim Selles
@wswebcreation

Hi @annaqs7_twitter

Can you give me some more info like:

  • what os you are using
  • what's the version of NODE/NPM

And you're package.json

Kiran Mistry
@Kiran-Mistry
Does anyone know if you can use the browser Brave instead of Chrome?
Kiran Mistry
@Kiran-Mistry
I've seen that there is a way to edit the chrome options but that doesn't seem to be working.. perhaps @wswebcreation can help?
Wim Selles
@wswebcreation
?
Ravinder Singh
@HeybuddyRavi_twitter

Hi, I am using below configuration but by-default all baseline/actual screenshot are getting saved into ./temp/actual folder.

can someone please assist me why the screenshots are not saved into defined location as below

'image-comparison': {
        baselineFolder: join(process.cwd(), './test/reports/uiBaseline/'),
        formatImageName: '{tag}-{logName}-{width}x{height}',
        screenshotPath: join(process.cwd(), './test/reports/uiActual/'),
        diffFolder: join(process.cwd(), './test/reports/uiDiff/'),
                savePerInstance: true,
                    autoSaveBaseline: true,
                        blockOutStatusBar: true,
            },
Wim Selles
@wswebcreation
Can you show more of your WDIO config? Looks like it is not picking up the right paths
Ravinder Singh
@HeybuddyRavi_twitter
@wswebcreation please find the below full wdio config-
const defaultTimeoutInterval = process.env.DEBUG ? (60 * 60 * 500) : 90000;
const { join } = require('path');
const path = require('path');



exports.config = {

    specs: [
        './test/features/*.feature'
    ],
    // Patterns to exclude.
    exclude: [
        // './test/features/dp-login.feature',
        './test/features/dpe-onboarding.feature'
    ],

    maxInstances: 1,

    capabilities: [{

        maxInstances: 1,
        browserName: 'chrome',
    }],
    sync: true,
    logLevel: 'silent',

    baseUrl: 'http://localhost:3000/',
    baseUrl: 'https://developer.lloydsbanking.com/',

    // Default timeout for all waitFor* commands.
    waitforTimeout: 40000,
    connectionRetryTimeout: 90000,

    // Default request retries count
    connectionRetryCount: 3,

    // Test runner services
    services: ['selenium-standalone', 'image-comparison'],

    // Framework you want to run your specs with.
    framework: 'cucumber',

    // Test reporter for stdout.
    reporters: [
        'spec',
        ['junit', {
            outputDir: './test/reports/junit-results/',
            outputFileFormat: function (opts) { // optional
                return `results-${opts.cid}.${opts.capabilities}.xml`
            }
        }
        ],
        ['allure', {
            outputDir: './test/reports/allure-results/',
            disableWebdriverStepsReporting: true,
            disableWebdriverScreenshotsReporting: true,
            useCucumberStepReporter: false
        }
        ],
    ],

    cucumberOpts: {
        requireModule: ['@babel/register'],
        require: ['./test/stepDefinitions/when.js', './test/stepDefinitions/then.js', './test/stepDefinitions/given.js'],        // <string[]> (file/dir) require files before executing features
        backtrace: true,   // <boolean> show full backtrace for errors
        dryRun: false,      // <boolean> invoke formatters without executing steps
        failFast: false,    // <boolean> abort the run on first failure
        format: ['pretty'], // <string[]> (type[:path]) specify the output format, optionally supply PATH to redirect formatter output (repeatable)
        colors: true,       // <boolean> disable colors in formatter output
        snippets: true,     // <boolean> hide step definition snippets for pending steps
        source: true,       // <boolean> hide source uris
        profile: [],        // <string[]> (name) specify the profile to use
        strict: false,      // <boolean> fail if there are any undefined or pending steps
        tagExpression: '',  // <string> (expression) only execute the features or scenarios with tags matching the expression
        timeout: 290000,     // <number> timeout for step definitions
        ignoreUndefinedDefinitions: false, // <boolean> Enable this config to treat undefined definitions as warnings.
    },

    'image-comparison': {
        baselineFolder: join(process.cwd(), './test/reports/uiBaseline/'),
        formatImageName: '{tag}-{logName}-{width}x{height}',
        screenshotPath: join(process.cwd(), './test/reports/uiActual/'),
        diffFolder: join(process.cwd(), './test/reports/uiDiff/'),
                savePerInstance: true,
                    autoSaveBaseline: true,
                        blockOutStatusBar: true,
                            blockOutToolBar: true,
        },

     before: function (capabilities, specs) {
         const chai = require('chai');
         global.expect = chai.expect;
         global.assert = chai.assert;
         global.should = chai.should();
         log.info('some logs')
         this.foo = delay(1000).then(() => { console.log('Promise 1 resolved') })
     },
}
Wim Selles
@wswebcreation
@HeybuddyRavi_twitter
You're not using the config properly
See how to configure it in the docs
Ravinder Singh
@HeybuddyRavi_twitter

I am using two services one is selenium standalone and second one is image.

services: ['selenium-standalone', 'image-comparison'],

so the service argument is on top of 'image-comparison'

Wim Selles
@wswebcreation
no, please check the docs, you need to configure the service as stated there
like
    services: [ 
        'selenium-standalone',
        ['image-comparison', 
        // The options
        {
            // Some options, see the docs for more
            baselineFolder: join(process.cwd(), './tests/sauceLabsBaseline/'),
            formatImageName: '{tag}-{logName}-{width}x{height}',
            screenshotPath: join(process.cwd(), '.tmp/'),
            savePerInstance: true,
            autoSaveBaseline: true,
            blockOutStatusBar: true,
            blockOutToolBar: true,
            // ... more options
        }], 
    ],
Ravinder Singh
@HeybuddyRavi_twitter
go it, it's working.
Wim Selles
@wswebcreation
:thumbsup:
Ravinder Singh
@HeybuddyRavi_twitter
thanks @wswebcreation
Ravinder Singh
@HeybuddyRavi_twitter
@wswebcreation in which folder the diff image will be saved?
Wim Selles
@wswebcreation
the folder you provide, only where there is a diff
Ravinder Singh
@HeybuddyRavi_twitter

@wswebcreation i provided the below config

services: [
        ['image-comparison',
            {
                baselineFolder: join(process.cwd(), './test/reports/'),
                formatImageName: '{tag}-{logName}-{width}x{height}',
                baselineFolder: join(process.cwd(), './test/reports/uiBaseline'),
                diffFolder: join(process.cwd(), './test/reports/uiDiff/'),
                savePerInstance: true,
                autoSaveBaseline: true,
                blockOutStatusBar: true,
                blockOutToolBar: true,
            }],
            'selenium-standalone'
    ],

it's getting failed at one of the step but diff image is not getting saved in diff folder-

[chrome 75.0.3770.100 Mac OS X #0-0] 1) Performing OnBoarding with new provider When I choose to onBoard with from HomePage
[chrome 75.0.3770.100 Mac OS X #0-0] expected 0.25 to equal 0
[chrome 75.0.3770.100 Mac OS X #0-0] AssertionError: expected 0.25 to equal 0
Wim Selles
@wswebcreation
it should be in test/reports/uiDiff/
else search the project for the file names
Need to go now
Ravinder Singh
@HeybuddyRavi_twitter
it's going in .temp/diff folder
instead of defined one -test/reports/uiDiff/
where in similar folder structure images are getting saved in actual and getting picked from baseline folder