Download and share automation modules and examples.
-
Support Team
- Site Admin

- Posts: 12174
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
-
Contact:
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:
- 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..."
- Add "Microsoft.VisualBasic" to the References of your project by by right-clicking on References and choosing "Add Reference"
- 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 804 times
-
omayer
- Posts: 458
- Joined: Thu Oct 28, 2010 6:14 pm
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
-
Support Team
- Site Admin

- Posts: 12174
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
-
Contact:
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
-
omayer
- Posts: 458
- Joined: Thu Oct 28, 2010 6:14 pm
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
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
-
Support Team
- Site Admin

- Posts: 12174
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
-
Contact:
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
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