# Rename Screenshot

**URL:** <https://forum.katalon.com/t/rename-screenshot/23859>\
**Category:** Web Testing\
**Tags:** web-testing, katalon-studio\
**Created:** [April 25, 2019, 7:29am UTC](https://forum.katalon.com/t/rename-screenshot/23859 "2019-04-25T07:29:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kokahontas](https://avatars.discourse-cdn.com/v4/letter/k/6a8cbe/32.png) [@Kokahontas](https://forum.katalon.com/u/Kokahontas)\
**Post date:** [April 25, 2019, 7:29am UTC](https://forum.katalon.com/t/rename-screenshot/23859/1 "2019-04-25T07:29:22Z")

</div>

Hello everyone 🙂

So, i have a question about the “TakeScreenshot” function in web testing.

Right now, if i use the TakeScreenshot keyword, the screenshot is store in:

username/git////Reports///TestSuite/Reportname/randomnumber.png

So, what i want, is to name the screenshot “SCREEN-1” but, store it in the “Reportname” folder. The “Reportname” folder has a timestamp name because it gets created, when the testsuite starts. So its a variable.

I tried:

> WebUI.takeScreenshot(‘SCREEN-1.jpg’)

But then i get:

> i/o error (java.io.FileNotFoundException: /Users/username/git////Reports//Testsuite/Reportname/SCREEN-1.jpg (No such file or directory)

and the SCREEN-1.jpg is stored in the Katalon main direction.

I also tried something like:

> WebUI.takeScreenshot(‘/SCREEN-1.jpg’)  
> WebUI.takeScreenshot(‘/\*SCREEN-1.jpg’)  
> WebUI.takeScreenshot(‘\*SCREEN-1.jpg’)  
> WebUI.takeScreenshot(‘%SCREEN-1.jpg’)

but nothing is working the way i want it. So i basically have two questions right now:

Is there a way to just “rename” the screenshot in the standard report folder?  
Is there a way to get the “Reportname” variable (TIMESTAMP) and use it to store the screenshot right there?

Thanks for your help 🙂

---

<div class="post-metadata">

**Author:** ![priyank.it](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/priyank.it/32/4471_2.png) [@priyank.it](https://forum.katalon.com/u/priyank.it)\
**Post date:** [April 25, 2019, 11:03am UTC](https://forum.katalon.com/t/rename-screenshot/23859/2 "2019-04-25T11:03:22Z")

</div>

**Is there a way to just “rename” the screenshot in the standard report folder?**

Yes, You can.  
WebUI.takeScreenshot(‘mytest.png’)

More info here:  
[https://docs.katalon.com/katalon-studio/docs/webui-take-screenshot.html#example](https://docs.katalon.com/katalon-studio/docs/webui-take-screenshot.html#example)

**Note:**  
Screen shot will be saved at root level if no path is provided.

Project location:  
D:\automation

File will be saved at:  
D:\automation

**Is there a way to get the “Reportname” variable (TIMESTAMP) and use it to store the screenshot right there?**

I dont think so it is. As folder is generated run time after the execution. Even if we achieve somehow, screenshot can’t be viewed if you open HTML summary report as image is of base64.

Hope it helps. Thanks

-Priyank

---

<div class="post-metadata">

**Author:** ![albert.vu](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/albert.vu/32/20595_2.png) [@albert.vu](https://forum.katalon.com/u/albert.vu)\
**Post date:** [August 8, 2022, 7:49am UTC](https://forum.katalon.com/t/rename-screenshot/23859/3 "2022-08-08T07:49:23Z")

</div>

Archived on August 8, 2022, 7:49am UTC


