# Screenshot not getting captured when running robot script with pabot

**URL:** <https://forum.robotframework.org/t/screenshot-not-getting-captured-when-running-robot-script-with-pabot/4046>\
**Category:** Robot Framework\
**Created:** [22 June 2022 13:45 UTC](https://forum.robotframework.org/t/screenshot-not-getting-captured-when-running-robot-script-with-pabot/4046 "2022-06-22T13:45:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bk-user](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/bk-user/32/1446_2.png) [@bk-user](https://forum.robotframework.org/u/bk-user)\
**Post date:** [22 June 2022 13:45 UTC](https://forum.robotframework.org/t/screenshot-not-getting-captured-when-running-robot-script-with-pabot/4046/1 "2022-06-22T13:45:24Z")

</div>

Hi All,

Screenshot not getting captured when running robot script with pabot. I am using below commands to run parallel-  
pabot -d results -t “\*TestTask” . . . test.robot

getting below error after executing with above command  
FAIL FileNotFoundError: [Errno 2] No such file or directory: ‘C:\Screenshots\homepage.png’

```
[Arguments] ${image_name}
# Capture screenshot image
${image}= Set Variable ../Screenshots/homepage.png
Log To Console Capturing screenshot image homepage.png
capture page screenshot ${image}
Log To Console Captured screenshot image homepage.png

```

* * *

When I run robot script using robot test.robot then only its capturing screenshots.

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [23 June 2022 14:47 UTC](https://forum.robotframework.org/t/screenshot-not-getting-captured-when-running-robot-script-with-pabot/4046/2 "2022-06-23T14:47:49Z")

</div>

> [@bk-user](#):
>
> `${image}= Set Variable ../Screenshots/homepage.png`

Try to use absolute path.  
Are you sure it is going to C:\ ?

Also the ${CURDIR} is always a good starting path.
