Forum Discussion

Ned's avatar
Ned
Occasional Contributor
5 years ago
Solved

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 ...
  • BenoitB's avatar
    5 years ago

    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