Seem
(S A)
December 5, 2019, 11:11am
1
Hi Everyone,
I am facing issue with the screenshot
i have used -try n catch blocks.
In try i have kept following code
In catch i have kept the following code.
But i am getting the following - run time error.
So what should i be doing to handle this?
Can i add the try catch again the catch block???
NOTE : I am having many sequences with the same catch block.
Please help
2 Likes
while mention the filepath in SAVE IMAGE activity we need to include the file extension as well like
“yourfolderpath/yourfilename.png”
Cheers @Seem
1 Like
Right!
@Seem : If you wanna handle it, I would recommend to make xaml of those activities in catch block and invoke it and use Try-Catch inside that xaml.
fine
is the folder path valid
copy the same and check in file explorer once
@Seem
Seem
(S A)
December 5, 2019, 11:26am
6
yes its valid
I am sharing a xaml file below.
with one sequence…
xyz.xaml (42.4 KB)
1 Like
Seem
(S A)
December 5, 2019, 11:30am
7
Planning to keep thosse screen shots in the Try block
I am no sure its okay or not???
i saw the xaml
willl this . comes along the folder name
Cheers @Seem
Seem
(S A)
December 5, 2019, 12:12pm
9
yeah, the .screenshots.
The DOT will come in the screenshots… thats just a folder name
i think that is why this error comes @Seem
can i see that folder from file explorer if possible with a screenshot
@Seem
place the folder in some other path and try with that path in save image once
just for confirmation
@Seem
postwick
(Paul)
April 12, 2020, 2:36am
13
You have the filename hardcoded. It could be failing because the file already exists. You should generate the filename at runtime (with an assign just before the save image) with something like…
folderPath + “Exception_” + Now.ToString(“MM_dd_yyyy_hh_mm_ss”) + “.png”
This will get you a unique filename unless you’re also generating multiple exception screenshots within 1 second of each other.