3

Using Selenium to test website, I want to take screenshot of the visible part of the page (the viewport).

In Chrome, firefox and opera by default it's like this. in IE I added a capability:

"ie.enableFullPageScreenshot": false

in Safari, I can't find a way to do it.

Also I want to avoid cropping the screenshot.

Elheni Mokhles
  • 3,801
  • 2
  • 12
  • 17

1 Answers1

0

May be :-

driver.manage().window().setSize(targetSize);

Source :-

https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/3752

Hope it will help you :)

Shubham Jain
  • 16,610
  • 15
  • 78
  • 125