Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Taking element screenshot with ChromeEmulation #196

Open
jayantsarda opened this issue May 5, 2020 · 0 comments
Open

Taking element screenshot with ChromeEmulation #196

jayantsarda opened this issue May 5, 2020 · 0 comments

Comments

@jayantsarda
Copy link

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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant