Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 16 09:30
    simonwilson1985 opened #15
  • Sep 14 07:33

    wswebcreation on master

    chore: update firefox image for… (compare)

  • Aug 24 15:23
    wswebcreation closed #13
  • Aug 24 15:23
    wswebcreation commented #13
  • Aug 24 15:18
    wswebcreation labeled #14
  • Aug 24 15:18
    wswebcreation unlabeled #14
  • Aug 24 15:18
    wswebcreation closed #14
  • Aug 24 15:18
    wswebcreation commented #14
  • Aug 23 12:40
    gmontoya190 commented #14
  • Aug 21 07:14
    wswebcreation commented #14
  • Aug 21 07:14
    wswebcreation labeled #14
  • Aug 21 07:13
    wswebcreation assigned #14
  • Aug 21 07:03
    gmontoya190 commented #14
  • Aug 20 18:22
    wswebcreation commented #13
  • Aug 20 18:22
    wswebcreation commented #13
  • Aug 20 18:20

    wswebcreation on master

    1.5.1 (compare)

  • Aug 20 18:20

    wswebcreation on v1.5.1

    (compare)

  • Aug 20 18:18

    wswebcreation on master

    chore: update to right dependen… (compare)

  • Aug 20 16:19
    wswebcreation commented #14
  • Aug 20 15:55
    wswebcreation edited #14
goatsy
@goatsy
Hello, I am experimenting with the wdio-image-comparison :)
I use already WebdriverIO for functional testing and allure as the reporter.
Is there a integration that I can show the diff-images directly in Allure?
Wim Selles
@wswebcreation
Yes, you can use the attach function from Allure, make sure you return all data from the comparison (returnAllCompareData:true) and read the diff file from the disk and add it to the report
Simon Wilson
@simonwilson1985
should saveFullPageScreen work with Chrome? I'm taking a screenshot of a pdf screen but it still has scroll bar showing in the screenshot and cuts the bottom off?
Wim Selles
@wswebcreation

should saveFullPageScreen work with Chrome?

Yes, but this is not a scenario that I expected in which the module would be used :wink:

Do you have an example project or something?
Simon Wilson
@simonwilson1985
It's used for communications we send to customers so I can' really send what I have yet. Give me 5 mins and I will format some stuff out :)
it's basically just a link we click on to see what we sent a customer, and it opens a pdf of the comms
image.png
this is what is saved using saveFullPageScreen
Wim Selles
@wswebcreation
Hmm, yeah, this is as said not a normal case for this module, it's basically opening a pdf in a chrome browser, isn't it?
Simon Wilson
@simonwilson1985
correct
Wim Selles
@wswebcreation
Ok, can you file an issue, and provide all the needed info, I need to check if I can create something for this
Simon Wilson
@simonwilson1985
:+1:
Simon Wilson
@simonwilson1985
@wswebcreation done. If you need any further info, let me know. Like I say in the ticket, I've only just started experimenting with it so I'm not overly familiar with it yet.
Wim Selles
@wswebcreation
Awesome, thanks
goatsy
@goatsy

Yes, you can use the attach function from Allure, make sure you return all data from the comparison (returnAllCompareData:true) and read the diff file from the disk and add it to the report

Thank you! I will try this. But to make sure: How do I know the path to the file name that I want to attach at that moment the test is over?

Guillermo Montoya
@gmontoya190
Hi guys! I am using the plugin to take some screenshots on iphone, basically I am using the method checkFullScreenshot passing some options. This is the web page where I am taking the screenshot https://drive.google.com/open?id=19DTAKtcqmtGu3jdgBgIWBfoGMXgLYnCA and when using the method the screenshot is being cut partially at the top https://drive.google.com/open?id=1lsYhS-huZkvJ2g1jV_DT9pxs6jU53aku. I am not sure if this expected for the method checkFullScreenshot or there may be some issue in this case.
Guillermo Montoya
@gmontoya190
@wswebcreation do you have any insight what could be the problem?
Wim Selles
@wswebcreation

@goatsy

Thank you! I will try this. But to make sure: How do I know the path to the file name that I want to attach at that moment the test is over?

By providing the right property when you instantiate the module, take a look here https://github.com/wswebcreation/wdio-image-comparison-service#test-result-outputs and here https://github.com/wswebcreation/webdriver-image-comparison/blob/master/docs/OPTIONS.md#returnallcomparedata

@gmontoya190

Well, yes and no, can you provide the config and the code you use to test this?

Guillermo Montoya
@gmontoya190
const checkRoot = (kind, name) => {
  const testOptions = {
    baselineFolder: path.join(process.cwd(), `screenshots/reference/${kind}/${name}`),
    actualFolder: path.join(process.cwd(), `screenshots/current/${kind}/${name}`),
    diffFolder: path.join(process.cwd(), `screenshots/diff/${kind}/${name}`),
    screenshotPath: path.join(process.cwd(), `screenshots/diff/${kind}/${name}`),
    ignoreAntialiasing: true,
    fullPageScrollTimeout: 3000,
    blockOutStatusBar: true,
    blockOutToolBar: true
  };

  return browser.checkFullPageScreen('FullPage', testOptions);
};
I am using this configuration and calling the full screenshot method
from capabilities I am using the iphone device
capabilities: [
    {
      os_version: '12.1',
      device: 'iPhone XS',
      deviceName: 'iPhone XS',
    },
  ],
this mobile devices is running in browser stack
@wswebcreation
Wim Selles
@wswebcreation
@gmontoya190
Can you please provide a screenshot of the iPhone device when you do a saveScreen of that page, I'm curious what Browserstack is giving back
Guillermo Montoya
@gmontoya190
@wswebcreation I found the cause, it was because an issue with the view port running in storybook. Also, i have the variable clearRuntimeFolder set to true in the options, but I dont see this is cleaning up my diff folder in every execution
 const testOptions = {
    baselineFolder: path.join(process.cwd(), `screenshots/reference/${kind}/${name}`),
    actualFolder: path.join(process.cwd(), `screenshots/current/${kind}/${name}`),
    diffFolder: path.join(process.cwd(), `screenshots/diff/${kind}/${name}`),
    screenshotPath: path.join(process.cwd(), `screenshots/diff/${kind}/${name}`),
    ignoreAntialiasing: true,
    fullPageScrollTimeout: 3000,
    blockOutStatusBar: true,
    blockOutToolBar: true,
    clearRuntimeFolder: true
  };
  return browser.checkFullPageScreen('FullPage', testOptions);
Wim Selles
@wswebcreation
Hmm, it should
let me check
Guillermo Montoya
@gmontoya190
is this the correct way to use that property
?
Wim Selles
@wswebcreation
ahh, no
That's a plugin option
and not a method option
so you need to add it when you instantiate the module in the config
Guillermo Montoya
@gmontoya190
I also tried that way, from the module config
const visualRegressionService = {
  services: [
    [
      'image-comparison',
      {
        formatImageName: '{deviceName}_{width}',
        autoSaveBaseline: true,
        debug: false,
        clearRuntimeFolder: true,
        blockOutStatusBar: true,
        blockOutToolBar: true
      },
    ],
  ],
};
Wim Selles
@wswebcreation
because you don;t provide all the needed options
sorry
This is something that is not correct in the docs, let me change it, give me a sec
Guillermo Montoya
@gmontoya190
thanks for the clarification! @wswebcreation
Wim Selles
@wswebcreation
You're welcome
buoyqa
@buoyqa
With browserstack and image-comparison, is there any known issues where hideAfterFirstScroll will not work on the first scroll? It works fine on subsequent scrolls and using hideElements works as expected.
Wim Selles
@wswebcreation
This should not be a problem that is related to the module
How does it work on local execution?
buoyqa
@buoyqa
The nav bar is captured on the first scroll, but not on other scrolls. On the first scroll I can see it disappear, but looks like the screenshot happens before the element is set to invisible
(looking at the playback on browserstack)