Hi : I am trying to take screenshot while I am executing the test case for my scripts. Currently I’m using “TakeScreenshot” function that is default available in Katalon.
But my recruitment is to capture the entire window including the Windows task bar (with date and time).
Can anyone help on this by providing the code ?
This can be not be done by Katalon.
To take windows snapshot you can do it by java.awt.Robot to “create an image containing pixels read from the screen.” You can then write that image to a file on
example
Rectangle screenRect = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize());BufferedImage capture = new Robot().createScreenCapture(screenRect);ImageIO.write(capture, "bmp", new File(args[0]));
2 Likes
You can also import an external javascript library called Ashot and create a custom defined keyword to take the screenshot of the entire page. I have tested it and it worked. Here is the post
1 Like