Reputation: 198238
We're using protractor for angularjs application e2e tests. We have a feature which will check the devicePixelRatio
of window
, then generate different image url in order to provide high-quality image for retina screens.
But how to test it with protractor? I can't find any option can specify it with protractor APIs.
Upvotes: 0
Views: 471
Reputation: 8900
Try to fake it by setting the value of window.devicePixelRatio
using executeScript
or executeAsyncScript
.
browser.executeScript('window.devicePixelRatio = 2');
Upvotes: 2