How to have winrunner insert yesterdays date into a field in the application?
Submitted by: Administrator1) Use get-time to get the PC system time in seconds since 01/01/1970
2)Subtract 86400 (no seconds in a day) from it
3)Use time_str to convert the result into a date format
4)If format of returned date is not correct use string manipulations to get the format you require
5) Insert the date into your application
Alternatively you could try the following :
1) In an Excel datasheet create a column with an appropriate name, and in the first cell of the column use the excel formula 'today() - 1'
2) Format the cell to give you the required date format
3) Use the ddt- functions to read the date from the excel datasheet
4) insert the reteived date into your application
Submitted by: Administrator
2)Subtract 86400 (no seconds in a day) from it
3)Use time_str to convert the result into a date format
4)If format of returned date is not correct use string manipulations to get the format you require
5) Insert the date into your application
Alternatively you could try the following :
1) In an Excel datasheet create a column with an appropriate name, and in the first cell of the column use the excel formula 'today() - 1'
2) Format the cell to give you the required date format
3) Use the ddt- functions to read the date from the excel datasheet
4) insert the reteived date into your application
Submitted by: Administrator
Read Online WinRunner Job Interview Questions And Answers
Top WinRunner Questions
☺ | How do you handle unexpected events and errors? |
☺ | How do you handle TSL exceptions? |
☺ | What do you verify with the database check point custom and what command it generates, explain syntax? |
☺ | How to have winrunner insert yesterdays date into a field in the application? |
☺ | What information is contained in the checklist file and in which file expected results are stored? |
Top Testing Categories
☺ | Manual Testing Interview Questions. |
☺ | Rational TestSuite Interview Questions. |
☺ | QTP Interview Questions. |
☺ | Database Testing Interview Questions. |
☺ | Software QA Interview Questions. |