Set view port size and screenshot for visual testing

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.