Set view port size and screenshot for visual testing

Hi there, does anyone know how to view the result in testops for 1920 x 1080 size during screenshot / visual testing?

1 Like

Hi,
With this, I suggest that you should configure screenshots manually, then adding this set view port size

1 Like

I’ve tried adding the set view port size but during the screenshot for Take Full Page Screenshot As Checkpoint , it couldn’t properly screenshot the size that I want, that’s the issue I’m facing now. Do you have other solution?

Will you be able to use take area screenshot?

@dianachin971

You wrote:

This sentence is not clear enough to others. I don’t see how you want the PNG image to be.

Please clarify the following points:

  1. What value of (width, height) of the browsers’ view port size did you set?

  2. What value of width of the PNG file do you expect?

  3. What value of width of the PNG file did you actually ge by your test code?

  4. Does the PNG image covers the screen image you expected to shoot? Does the PNG image shows the full picture that you expected to get? Does it shows only a smaller portion of what you expected? If possible share the PNG image file here and describe how it is taken not properly.

For your information, have a look at my previous post

The Katlaon built-in WebUI.take*PageScreenshot* keywords do not take the “Device Pixel Ratio” into account. Therefore, even if I set the view port width of browser to be 800 pixels, the resuliting PNG file will have a different width. The width will be far larger. For examle, a view port of 800 pixcel may result in a PNG file with with of 1600 pixels on my machine. The ratio depends on the “Device Pixcel Ratio” of the machine on which the test code ran.