cancel
Showing results for 
Search instead for 
Did you mean: 

How do I use the POST screenshot for a file that just got created in c:\temp

SOLVED
Highlighted
Occasional Contributor

How do I use the POST screenshot for a file that just got created in c:\temp

Can someone show me how to show a screenshot of a file that just got created, much more to show proof the file was created.

 

I have a run script routine created to tell me if the file was created but I would like to capture a screenshot of the file as well or if its not possible can it be appended to the result log instead.

 

The test is done with the Keyword test but if adding a routine is easier by own mean please give me an example.

 

The end goal is to save the proof the file was created if someone wants to recheck it later.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Leader

Re: How do I use the POST screenshot for a file that just got created in c:\temp

You have two solutions, one by Explorer, one by cmd.

 

Explorer

  • launch explorer,
  • go to your directory,
  • make a search on your filename (because if directory is already filled, that will avoid you to scroll on)
  • use explorer obj.Picture() to save it as screenshot inside log or in external file
  •  

Cmd

  • launch cmd
  • make a dir c:\temp\yourfilename
  • use cmd obj.Picture() to save it as screenshot inside log or in external file

 

In both that will slowdown your test execution and implies files and rights access.

If it happens frequently, keep the Explorer or Cmd instance opened to reduce time/action.

 

How to manipulate Explorer and Cmd ? take a glance at the TestComplete samples

 

 

Un sourire et ça repart

View solution in original post

5 REPLIES 5
Community Leader

Re: How do I use the POST screenshot for a file that just got created in c:\temp

You have two solutions, one by Explorer, one by cmd.

 

Explorer

  • launch explorer,
  • go to your directory,
  • make a search on your filename (because if directory is already filled, that will avoid you to scroll on)
  • use explorer obj.Picture() to save it as screenshot inside log or in external file
  •  

Cmd

  • launch cmd
  • make a dir c:\temp\yourfilename
  • use cmd obj.Picture() to save it as screenshot inside log or in external file

 

In both that will slowdown your test execution and implies files and rights access.

If it happens frequently, keep the Explorer or Cmd instance opened to reduce time/action.

 

How to manipulate Explorer and Cmd ? take a glance at the TestComplete samples

 

 

Un sourire et ça repart

View solution in original post

Highlighted
Community Hero

Re: How do I use the POST screenshot for a file that just got created in c:\temp

Hi,

 

If textual evidence is enough, you may consider the approach mentioned here (https://support.smartbear.com/testcomplete/docs/app-testing/desktop/console/working-with-stdin-and-s...) - it will not require getting and screenshotting of additional windows.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Highlighted
Community Manager

Re: How do I use the POST screenshot for a file that just got created in c:\temp

Thank you a lot Alex and BenoitB. Great suggestions.

 

Hi @Ned , please mark the suggestion that works for you best as a solutionSmiley Happy 


Sonya Mihaljova
Community and Education Specialist
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
Occasional Contributor

Re: How do I use the POST screenshot for a file that just got created in c:\temp

These solution will work for me, but will I try to do Benoit's direction first.

 

Thank you a lot Alex and BenoitB. Both are great suggestions

Highlighted
Community Manager

Re: How do I use the POST screenshot for a file that just got created in c:\temp

Great! I'll go ahead and mark this reply as a solution for now then Smiley Happy


Sonya Mihaljova
Community and Education Specialist
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
A new challenge is here!

Create a function to drag one element to another for the TechCorner tag!

Will you dare to take the challenge?


Scripts created in July:
- Passing custom command-line arguments as a test parameter
Top Kudoed Authors