ashot icon indicating copy to clipboard operation
ashot copied to clipboard

Taking element screenshot with ChromeEmulation

Open jayantsarda opened this issue 4 years ago • 0 comments

Hi am sure there should be some configuration which i was unable to figure out. I am running my chrome driver with capability set as ChromeOptions.CAPABILITY, chromeOptions("Google Nexus 6P") This runs my webpage in mobile emulation. While. taking screen shot for the page momentarily zooms out and than it takes screen shot. it some times capture the proper element size or some times it captures the zoomed image. I can provide any other details needed . Pls do let me know if i am missing any configuration below is what i am trying so far.

ShootingStrategy strategy = ShootingStrategies.viewportNonRetina(ShootingStrategies.simple(), 500, cutStrategy); new Ashot().shootingStrategy(strategy).coordsProvider(new WebDriverCoordsProvider()).takeScreenshot(driver, element);

jayantsarda avatar May 05 '20 22:05 jayantsarda