ashot
ashot copied to clipboard
Taking element screenshot with ChromeEmulation
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);