Closed roperezp closed 4 years ago
Hello, after added nativeWebScreenshot: true
both baseline and actual screenshots were created. However, still getting an error from webdriver-image-comparison
:
Jasmine started
(node:40723) UnhandledPromiseRejectionWarning: JavascriptError: javascript error: Cannot read property '1' of null
(Session info: chrome=74.0.3729.186)
(Driver info: chromedriver=2.46.628411 (3324f4c8be9ff2f70a05a30ebc72ffb013e1a71e),platform=Mac OS X 10.14.6 x86_64)
at Object.checkLegacyResponse (/Users/roperez/github/ncl-consumer-booking-engine/ui/node_modules/selenium-webdriver/lib/error.js:546:15)
at parseHttpResponse (/Users/roperez/github/ncl-consumer-booking-engine/ui/node_modules/selenium-webdriver/lib/http.js:509:13)
at /Users/roperez/github/ncl-consumer-booking-engine/ui/node_modules/selenium-webdriver/lib/http.js:441:30
at processTicksAndRejections (internal/process/task_queues.js:93:5)
From: Task: WebDriver.executeScript()
at thenableWebDriverProxy.schedule (/Users/roperez/github/ncl-consumer-booking-engine/ui/node_modules/selenium-webdriver/lib/webdriver.js:807:17)
at thenableWebDriverProxy.executeScript (/Users/roperez/github/ncl-consumer-booking-engine/ui/node_modules/selenium-webdriver/lib/webdriver.js:878:16)
at run (/Users/roperez/github/ncl-consumer-booking-engine/ui/node_modules/protractor/built/browser.js:59:33)
at to.<computed> (/Users/roperez/github/ncl-consumer-booking-engine/ui/node_modules/protractor/built/browser.js:67:16)
at Object.<anonymous> (/Users/roperez/github/ncl-consumer-booking-engine/ui/node_modules/webdriver-image-comparison/lib/methods/rectangles.ts:96:7)
at step (/Users/roperez/github/ncl-consumer-booking-engine/ui/node_modules/webdriver-image-comparison/build/methods/rectangles.js:32:23)
at Object.next (/Users/roperez/github/ncl-consumer-booking-engine/ui/node_modules/webdriver-image-comparison/build/methods/rectangles.js:13:53)
at /Users/roperez/github/ncl-consumer-booking-engine/ui/node_modules/webdriver-image-comparison/build/methods/rectangles.js:7:71
at new Promise (<anonymous>)
at __awaiter (/Users/roperez/github/ncl-consumer-booking-engine/ui/node_modules/webdriver-image-comparison/build/methods/rectangles.js:3:12)
(node:40723) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:40723) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
A Jasmine spec timed out. Resetting the WebDriver Control Flow.
A Jasmine spec timed out. Resetting the WebDriver Control Flow.
@roperezp
Sorry for my late response. Regarding your test, this is not needed
it('Empty Test', async (done) => {
// This can be removed, because `checkScreen` will already do the magic
await browser.imageComparison.saveScreen('examplePaged', { /* some options*/ });
expect(await browser.imageComparison.checkScreen('examplePaged', { /* some options*/ })).toEqual(0);
done();
});
I looks like the ChromeDriver screenshot is timing out. This is something in Appium / ChromeDriver, not in this module. The reason why nativeWebScreenshot: true
is failing has to do with the fact that the core module, https://github.com/wswebcreation/webdriver-image-comparison, doesn't support Android 10 yet, I've created a bug, see here to fix that
@roperezp
I've added Android 10, in the latest release. Can you check it again?
Hi, I just tried and it worked fine! This is my capabilities
setup:
browserName: 'chrome',
platformName: 'Android',
automationName: 'UiAutomator2',
clearSystemFiles: true,
platformVersion: '10',
nativeWebScreenshot: true,
norReset: true,
chromeOpts: {
args: [ '--no-first-run' ]
}
Awesome, thanks for getting back
Environment (please complete the following information):
protractor:
protractor-image-comparison:
Test:
Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. Multiple asynchronous test are completing successfully with same configuration, the issue was introduced once calling
await browser.imageComparison.saveScreen()
. Please note same configuration is working as expected (running same sample test) on desktop chrome/safari.2019-09-25T19_59_29_641Z-debug.log