I have made a demo project here:
Problem to solve
I wanted to take an screenshot of a Web page. The target page was supposed to have the height over 10,000px.
I tried WebUI.takescreenshot() and found it can only take visual portion; it can not take the image of entire page.
By searching I found a Java Library called AShot.
WebDriver Screenshot utility
- Takes a screenshot of a WebElement on different platforms (i.e. desktop browsers, iOS Simulator Mobile Safari, Android Emulator Browser)
- Decorates screenshots
- Provides flexible screenshot comparison
I was impressed with the simplicity of the sample code of capturing the entire page by AShot. So I tried AShot in Katalon Studio.
I have found AShot works like a charm.
Here I attached the screenshot taken by AShot: