Page 1 of 1

Cleanup Folder Module

Posted: Thu Jun 30, 2011 10:41 am
by Support Team
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.

Re: Cleanup Folder Module

Posted: Thu Feb 23, 2012 7:06 am
by omayer
How to clean up object after each iteration, do i need to create function for destructure or ...?
Thank you Advance
Beginner

Re: Cleanup Folder Module

Posted: Thu Feb 23, 2012 12:44 pm
by Support Team
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

Re: Cleanup Folder Module

Posted: Fri Feb 24, 2012 4:08 pm
by omayer
Thank you Peter.

Re: Cleanup Folder Module

Posted: Tue Feb 28, 2012 4:18 pm
by omayer
ok looks like this one for cleanup folders but not for destroying the object on each run,
Thanks,
Beginner

Re: Cleanup Folder Module

Posted: Wed Feb 29, 2012 9:56 am
by Support Team
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