Cleanup Folder Module

Download and share automation modules and examples.
User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Cleanup Folder Module

Post by Support Team » Thu Jun 30, 2011 10:41 am

It is often required to delete a folder or files – created by the system under test during a previously executed test run – to initialize a new test execution. This code module deletes a folder including the files and subfolders in it.

Usage:
  1. Download the "CleanupFolder.cs" file to your computer and import it into your project by right-clicking your project in Ranorex Studio and choose "Add" -> "Existing Item..."
  2. Add "Microsoft.VisualBasic" to the References of your project by by right-clicking on References and choosing "Add Reference"
  3. Drag & Drop the module to your test case and define the variables by binding them to a parameter in your test case

    Variables:
    FolderName (required)
    Deletion folder source path name (e.g. "C:/temp")

    DeletePermanently
    If set to "True" the folder and its contents will be deleted permanently. Default is false.
Attachments
CleanupFolder.cs
Cleanup Folder Module
(2.52 KiB) Downloaded 596 times

omayer
Posts: 458
Joined: Thu Oct 28, 2010 6:14 pm

Re: Cleanup Folder Module

Post by omayer » Thu Feb 23, 2012 7:06 am

How to clean up object after each iteration, do i need to create function for destructure or ...?
Thank you Advance
Beginner
Tipu

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Cleanup Folder Module

Post by Support Team » Thu Feb 23, 2012 12:44 pm

Hi,
omayer wrote:How to clean up object after each iteration, do i need to create function for destructure or ...?
Just add the code module to your testcase at the end or in the tear down container.

Regards,
Peter
Ranorex Team
.
Image

omayer
Posts: 458
Joined: Thu Oct 28, 2010 6:14 pm

Re: Cleanup Folder Module

Post by omayer » Fri Feb 24, 2012 4:08 pm

Thank you Peter.
Tipu

omayer
Posts: 458
Joined: Thu Oct 28, 2010 6:14 pm

Re: Cleanup Folder Module

Post by omayer » Tue Feb 28, 2012 4:18 pm

ok looks like this one for cleanup folders but not for destroying the object on each run,
Thanks,
Beginner
Tipu

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Cleanup Folder Module

Post by Support Team » Wed Feb 29, 2012 9:56 am

omayer wrote:ok looks like this one for cleanup folders
That's what the subject of this forum thread suggests :wink:
omayer wrote:but not for destroying the object on each run
I don't definitely know what you mean by "destroying", but in general there is no common way to "reset" the state of an application or object, so we cannot provide a common module for that.

Regards,
Alex
Ranorex Team
.
Image