Batch script not running through TestComplete
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2021
01:21 PM
10-11-2021
01:21 PM
Batch script not running through TestComplete
I want to run a batch script in one of my tests that deletes some records from a db.
I have the following function:
function deleteReports() {
Sys.OleObject("WScript.Shell").Exec("cmd /c C:\Users\nnr6cbq\Desktop\Delete_Dashboard_Reports.bat");
}
When I execute the function, it seems to very quickly open a cmd prompt but then stops and the test shows as passed.
However, the script was not actually executed.
When I run the script manually, it works as intended. What am I missing?
Solved! Go to Solution.
Labels:
- Labels:
-
Scripting
2 REPLIES 2
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2021
03:08 PM
10-11-2021
03:08 PM
This archived thread may be of some help
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2021
06:43 AM
10-12-2021
06:43 AM
Thanks, adding the batch script as a TestedApp and running like TestedApps.*Name*.Run(); worked
