Re: How to back the systemdate to 2 days with silk script
I don't now if standard functions for this operation exists but I did such operation in the following way:
1) Run cmd command to open command line interpretator
2) Type date and press <Enter>
3) Type date using required format and press <Enter>
4) Type exit and press <Enter> to close command line interpretator
How to implement in in SilkTest? It is easy. For ex. we need to set system date to June 11, 2006 and date format dd-mm-yy is acceptable to date command.
First, we create file (let's name it Date.txt) with the following contants:
Don't forget to add extra line after exit statement.
Then we need only to call something like:
SYS_Execute("type Date.txt | cmd")
Date format from example may be different from format on your machine. So you need to specify it exactly.
To set system date back to required days you need only to change second line of Date.txt file