# \[WebUI\] Take Screenshot

**URL:** <https://forum.katalon.com/t/webui-take-screenshot/16757>\
**Category:** Miscellaneous\
**Tags:** new-doc-request\
**Created:** [January 4, 2019, 10:53am UTC](https://forum.katalon.com/t/webui-take-screenshot/16757 "2019-01-04T10:53:44Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/katalon/original/3X/d/5/d55596ab02785a255798e87ede769734747b30c4.svg) [@system](https://forum.katalon.com/u/system)\
**Post date:** [January 4, 2019, 10:53am UTC](https://forum.katalon.com/t/webui-take-screenshot/16757/1 "2019-01-04T10:53:44Z")

</div>

* * *
This is a companion discussion topic for the original entry at [https://docs.katalon.com/katalon-studio/docs/webui-take-screenshot.html](https://docs.katalon.com/katalon-studio/docs/webui-take-screenshot.html)

---

<div class="post-metadata">

**Author:** ![paijorx](https://avatars.discourse-cdn.com/v4/letter/p/dec6dc/32.png) [@paijorx](https://forum.katalon.com/u/paijorx)\
**Post date:** [January 9, 2019, 9:17am UTC](https://forum.katalon.com/t/webui-take-screenshot/16757/2 "2019-01-09T09:17:11Z")

</div>

Hi,

There is any script how to make sure the takeScreenshot is called after the page fully loaded?

Thanks

---

<div class="post-metadata">

**Author:** ![Mate\_Mrse](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/mate_mrse/32/345_2.png) [@Mate\_Mrse](https://forum.katalon.com/u/Mate_Mrse)\
**Post date:** [January 9, 2019, 9:37am UTC](https://forum.katalon.com/t/webui-take-screenshot/16757/3 "2019-01-09T09:37:49Z")

</div>

Add `WebUI.waitForPageLoad()` before taking screenshot.

---

<div class="post-metadata">

**Author:** ![Prashant\_Pednekar1](https://avatars.discourse-cdn.com/v4/letter/p/c67d28/32.png) [@Prashant\_Pednekar1](https://forum.katalon.com/u/Prashant_Pednekar1)\
**Post date:** [March 5, 2019, 2:56am UTC](https://forum.katalon.com/t/webui-take-screenshot/16757/5 "2019-03-05T02:56:56Z")

</div>

Is there a way to take a full-page screenshot by scrolling down?

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [March 5, 2019, 5:21am UTC](https://forum.katalon.com/t/webui-take-screenshot/16757/6 "2019-03-05T05:21:59Z")

</div>

Have a look at this:

> [@Taking entire page screenshots to measure the image-diff using AShot](http://forum.katalon.com/t/taking-entire-page-screenshot-using-ashot-in-katalon-studio/12429):
>
> I have made a demo project here: [GitHub - kazurayam/EntirePageScreenshotByAShotInKatalonStudio: https://forum.katalon.com/t/taking-entire-page-screenshot-using-ashot-in-katalon-studio/12429](https://github.com/kazurayam/EntirePageScreenshotByAShotInKatalonStudio) ------ (Updated 24 JUNE 2021) 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 wanted to take screenshots of a web page in the Development environment and the Production Environment, and compare to see how much different they…

---

<div class="post-metadata">

**Author:** ![januari](https://avatars.discourse-cdn.com/v4/letter/j/35a633/32.png) [@januari](https://forum.katalon.com/u/januari)\
**Post date:** [March 5, 2019, 10:12am UTC](https://forum.katalon.com/t/webui-take-screenshot/16757/7 "2019-03-05T10:12:54Z")

</div>

How for taking screenshoot on mobile testing when execution failed?

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [March 5, 2019, 11:51am UTC](https://forum.katalon.com/t/webui-take-screenshot/16757/8 "2019-03-05T11:51:06Z")

</div>

> [@januari](#):
>
> on mobile testing

Try googling with key "Appium screenshot " and read resources found.

As [Appium doc](http://appium.io/docs/en/commands/session/screenshot/) tells, you can take a screenshot of the current viewport/window/page.

Howerver there seems to be no library in Java which enables to take entire-page screenshot of mobile pages.

[aShot](https://github.com/pazone/ashot) enables you to take entire page screenshot of web pages via WebDriver, but it does not support Appium.

---

<div class="post-metadata">

**Author:** ![devalex88](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/devalex88/32/336_2.png) [@devalex88](https://forum.katalon.com/u/devalex88)\
**Post date:** [March 5, 2019, 1:11pm UTC](https://forum.katalon.com/t/webui-take-screenshot/16757/9 "2019-03-05T13:11:46Z")

</div>

> [@januari](#):
>
> How for taking screenshoot on mobile testing when execution failed?

Please create a separate topic - it will help more people see your question.

---

<div class="post-metadata">

**Author:** ![januari](https://avatars.discourse-cdn.com/v4/letter/j/35a633/32.png) [@januari](https://forum.katalon.com/u/januari)\
**Post date:** [March 6, 2019, 3:54am UTC](https://forum.katalon.com/t/webui-take-screenshot/16757/10 "2019-03-06T03:54:09Z")

</div>

OK. Thanks a lot. but i think the screenhoot include to report that katalon given on pdf/hmtl. Not on local folder.

---

<div class="post-metadata">

**Author:** ![saif.mirza](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@saif.mirza](https://forum.katalon.com/u/saif.mirza)\
**Post date:** [April 1, 2019, 10:30am UTC](https://forum.katalon.com/t/webui-take-screenshot/16757/11 "2019-04-01T10:30:21Z")

</div>

I used the same script … it is shwoing cannot take screen shot

---

<div class="post-metadata">

**Author:** ![Ardo\_Indra\_Phang](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@Ardo\_Indra\_Phang](https://forum.katalon.com/u/Ardo_Indra_Phang)\
**Post date:** [April 9, 2019, 8:33am UTC](https://forum.katalon.com/t/webui-take-screenshot/16757/12 "2019-04-09T08:33:57Z")

</div>

Guys , how to take screen shot fully page , not at entire page ??

its important 🙂

---

<div class="post-metadata">

**Author:** ![EEsapa](https://avatars.discourse-cdn.com/v4/letter/e/c5a1d2/32.png) [@EEsapa](https://forum.katalon.com/u/EEsapa)\
**Post date:** [May 13, 2019, 2:49am UTC](https://forum.katalon.com/t/webui-take-screenshot/16757/13 "2019-05-13T02:49:07Z")

</div>

i thought is was stored in local folder

---

<div class="post-metadata">

**Author:** ![EEsapa](https://avatars.discourse-cdn.com/v4/letter/e/c5a1d2/32.png) [@EEsapa](https://forum.katalon.com/u/EEsapa)\
**Post date:** [May 13, 2019, 2:49am UTC](https://forum.katalon.com/t/webui-take-screenshot/16757/14 "2019-05-13T02:49:08Z")

</div>

Do you know where the screen get stored too? need help

---

<div class="post-metadata">

**Author:** ![kowsalya](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kowsalya/32/23870_2.png) [@kowsalya](https://forum.katalon.com/u/kowsalya)\
**Post date:** [August 15, 2019, 3:47am UTC](https://forum.katalon.com/t/webui-take-screenshot/16757/15 "2019-08-15T03:47:19Z")

</div>

By default it should be stored in temp folder.

Try %temp% in run command and check whether the screenshot is taken. Please check the documents,

1. default temp location storage.

```auto
'Take screenshot after logging in'
WebUI.takeScreenshot()

```

1. custom location store.

```auto
'Take screenshot after logging in'
WebUI.takeScreenshot('E:\\screenshot.png')

```

1. relative path storage which will be stored under your katalon studio folders in tests explorer.

```auto
'Take screenshot after logging in'
WebUI.takeScreenshot('Test/Demo.png')

```

---

<div class="post-metadata">

**Author:** ![wijayantorivaldi](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/wijayantorivaldi/32/16104_2.png) [@wijayantorivaldi](https://forum.katalon.com/u/wijayantorivaldi)\
**Post date:** [December 11, 2019, 5:42am UTC](https://forum.katalon.com/t/webui-take-screenshot/16757/16 "2019-12-11T05:42:44Z")

</div>

Hello,  
do you have a solution if I have a case, when making a screenshot but the storage folder is created directly. without the need to create a manual folder on my computer.

Thankss

---

<div class="post-metadata">

**Author:** ![eugene.konneh1](https://avatars.discourse-cdn.com/v4/letter/e/3ab097/32.png) [@eugene.konneh1](https://forum.katalon.com/u/eugene.konneh1)\
**Post date:** [January 20, 2020, 3:19pm UTC](https://forum.katalon.com/t/webui-take-screenshot/16757/17 "2020-01-20T15:19:56Z")

</div>

How can one add a time stamp / Test name to the name of the screen shot?

---

<div class="post-metadata">

**Author:** ![kowsalya](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kowsalya/32/23870_2.png) [@kowsalya](https://forum.katalon.com/u/kowsalya)\
**Post date:** [January 21, 2020, 1:11am UTC](https://forum.katalon.com/t/webui-take-screenshot/16757/18 "2020-01-21T01:11:36Z")

</div>

Date today = new Date()

String todaysDate = today.format(‘ddMMMyyyy’)

String nowTime = today.format(‘HHmmss’)

you can use this in script mode. then apppend this todaysDate+nowTime to your screenshot name

---

<div class="post-metadata">

**Author:** ![kowsalya](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kowsalya/32/23870_2.png) [@kowsalya](https://forum.katalon.com/u/kowsalya)\
**Post date:** [January 21, 2020, 1:15am UTC](https://forum.katalon.com/t/webui-take-screenshot/16757/19 "2020-01-21T01:15:55Z")

</div>

sorry for late reply. I’m little busy with my works. Please check whether this thread could help you

> [@How to create a folder with time stamp](http://forum.katalon.com/t/how-to-create-a-folder-with-time-stamp/29991):
>
> Issue 1: Hi i have to validate User Accounts . I have around 10 user account . Each and every time when i am validating that accounts the results needs to go to specific folder and it need to create sub folder with time stamp and store all the screen shots . For example Folder name : useraccounts2(main folder) → 7/22/2019\_ 11:53(sub folder)-\> all the screenshots so when ever i am executing User Account 2 that validation status should go to useraccounts2 folder Issue 2: Like that once the f…

---

<div class="post-metadata">

**Author:** ![lotakeketan](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/lotakeketan/32/11116_2.png) [@lotakeketan](https://forum.katalon.com/u/lotakeketan)\
**Post date:** [July 10, 2020, 6:28am UTC](https://forum.katalon.com/t/webui-take-screenshot/16757/20 "2020-07-10T06:28:57Z")

</div>

@kazurayam  
@devalex88

I am trying to capture screenshot using selenium screenshot function,

> byte scrBytes =((TakesScreenshot)DriverFactory.getWebDriver()).getScreenshotAs(OutputType.BYTES)  
> ByteArrayInputStream bytePartImage = new ByteArrayInputStream(scrBytes)  
> partImage[i]=ImageIO.read(bytePartImage)

It works fine with Windows browsers, but when I am trying capture screenshot on Mac browsers, it returns image with bigger dimension than viewport dimension as follows,

 ![image](https://europe1.discourse-cdn.com/katalon/original/2X/a/a031584dae097284b469978a55107b8af0e2bc97.png)

Kindly suggest some way (except Ashot)to solve it.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [July 10, 2020, 6:49am UTC](https://forum.katalon.com/t/webui-take-screenshot/16757/22 "2020-07-10T06:49:45Z")

</div>

> [@lotakeketan](#):
>
> it returns image with bigger dimension

Are you using MacOS Catalina (current version)?

Are you using a notebook type (MacBook, MacBook Air), or using 2nd Display device?

I ask this because the screenshot depends on the resolution you choose for the display.

* * *

On Windows 10 + 4K display, I had a problem of taking screenshot by Ashot:

> [@Taking entire page screenshots to measure the image-diff using AShot](http://forum.katalon.com/t/taking-entire-page-screenshot-using-ashot-in-katalon-studio/12429/14):
>
> Just now I learned a bit about [Windows 10’s View display settings](https://support.microsoft.com/en-us/help/4027860/windows-10-view-display-settings). [Windows 10’s View display setting](https://support.microsoft.com/en-us/help/4027860/windows-10-view-display-settings) introduced “Scale and layout”. My current setting is as follows (I use a 4K display device). [o33ug] I know very little about auto scaling of view display done by Windows 10, but I guess this feature may affect screenshots taken by application. What do I mean? The PNG file made by aShot on Windows 10 looks scaled out for 200% of the previous one taken on Windows 7. I tried a case where I wil…

On Windows 10 , we can choose scaling setting to 100% to avoid problem.

However, as far as I know, on Mac notebook with built-in display, it is impossible to scale the display to 100%. Therefore the screenshot taken on it becomes problematic.

[Next page](https://forum.katalon.com/t/webui-take-screenshot/16757.md?page=2)
