Calculate a dynamic value each test
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Calculate a dynamic value each test
Hi there!
I would like to use a variable which should be calculated each test.
For example, I would like to use a particular date (e.g. 01.05.2019).
I choose the "Keys" operation and set 01.05.2019 as Value.
Next time I want to use another value (e.g. 01.06.2019) but it should be updated automatically.
How can I set a rule to update my current value automatically and add one month each test like:
Thank you in advance!
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Something like this (untested pseudocode):
var strDT = aqConvert.DateTimeToFormatStr(aqDateTime.AddMonths(aqDateTime.Now(), 1), '%d.%m.%Y');
<control>.Keys(strDT);
/Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the feedback!
Could you advise how a code which generates the required variable could be implemented in a KeywordTest?
Currently, I do not use scripts so I'll appreciate any assistance regarding the matter.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can add bits of code to a keyword test with this:
Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
