Help with Time Comparison
Hope if someone could help. We have an office based application running on NT and 2000 that is not reporting the correct time. The time in the application is an hour behind than the system clock due to daylight savings. I have captured the time in both the PC system clock & application as an object. Can someone tell me how to compare the times within the script. I am not sure if it is just an if/else statement,or some different type of comparison? Thanks in advance for the help.
Re: Help with Time Comparison
Assuming you are using WinRunner - you would need at a minimum to use if/else or a switch/case statement to allow you to handle equality vs non-equality.
WRun has a compare_text function. Caution: it returns the value 1 when equal, else 0. Make sure you are comparing apples to apples in that the time strings are of the same format and length. If you are using the 'obj_get_text' command, the second argument contains the captured time.