Environment:
- Node.js version: 8.12.0
- NPM version: 6.4.1
- Browser name and version: Chrome 72.0.3626.96
- Platform name and version: Ubuntu 16.04
- Framework name and version: Protractor 5.4.2
- Plugin name and version: protractor-image-comparison 3.2.0
- webdriver-image-comparison version: 0.5.0
Config of the automation framework + plugin
here a basic example of how my conf.js looks like:
exports.config = {
framework: 'jasmine',
multiCapabilities: env.multiCapabilities,
baseUrl: env.baseUrl,
specs: [
'image-comparator.spec.js',
],
SELENIUM_PROMISE_MANAGER: false,
directConnect: true,
}
Describe the bug
Using the checkFullPageScreen method with a dialog which blocks the browser's scroll, I am getting a weird behavior as the way of calculating the scroll height is not working well.
To Reproduce
I created this simple example: https://angular-5sbdat.stackblitz.io/
and this is basic my test:
describe('compare example screen', () => {
beforeEach(async () => {
await browser.waitForAngularEnabled(false);
await browser.get("https://angular-5sbdat.stackblitz.io/");
});
it('should compare login page with a baseline', async () => {
await browser.sleep(3000);
await element.all(by.css('button')).get(0).click();
expect(await browser.imageComparison.checkFullPageScreen('test')).toEqual(0);
});
});
Using the version 0.4.8 I am getting this result (the desired one):

However using the version 0.5.0:

As you can see, using the version 0.5.0 checkFullPageScreen method is scrolling down but it does not make sense because the scroll is blocked by the dialog.