I want to write a code which generate todays date and from that I have to generate the date coded password.
Which method I use out following two options:
1. New Method with argument 'RepoItemInfo'
2. New Method with argument 'Adapter'
Once the date is generated, I have to generate date coded passcode using following formula:
Password = (((Month*31)+(day*day))*137)+(((year-2000)*16)+5987)
Want to generate user code to print the todays date
-
- Posts: 2
- Joined: Wed Apr 04, 2018 9:15 pm
Re: Want to generate user code to print the todays date
Hi,
Basically, you can use something like this:
Basically, you can use something like this:
As long as you don't want to use a repo element in your password obtaining method, you don't have to use any of the two arguments you mentioned.int curDateDay = System.DateTime.Now.Day;
int curDateMonth = System.DateTime.Now.Month;
int curDateYear = System.DateTime.Now.Year;
int password = (((curDateMonth*31)+(curDateDay*curDateDay))*137)+(((curDateYear-2000)*16)+5987);
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration