Recording Error While Selecting Yesterdays Date
Recording Error While Selecting Yesterdays Date
i Have Test Case which needs to select yesterdays date from calender's list item in my application ,when ever i try to open calender's list-item with Recording it automatically takes today date,so when i play this recording next day it will fail because tool cannot open the calender's list item because the script has repository element generated with yesterdays date.So kindly Suggest me the ways to overcome this problem.thanks in advance
Re: Recording Error While Selecting Yesterdays Date
Hi,
Apparently, you need to set the date you want in the calendar. You will have to use some code to pick the yesterday's date and then set this date in calendar.
This code should return yeasterday's date...
Unfortunately, it's hard to suggest something more detailed without more details about your AUT. Could you please post a Ranorex snapshot of the calendar in question?
Apparently, you need to set the date you want in the calendar. You will have to use some code to pick the yesterday's date and then set this date in calendar.
This code should return yeasterday's date...
Code: Select all
System.DateTime currentDate= System.DateTime.Now;
System.DateTime yesterdaysDate = currentDate.AddDays(-1);
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
Re: Recording Error While Selecting Yesterdays Date
Hi,
I'm not exactly sure why you bumped this post? There is nothing more I can do for you without the additional details I asked you for.
I'm not exactly sure why you bumped this post? There is nothing more I can do for you without the additional details I asked you for.
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
Re: Recording Error While Selecting Yesterdays Date
Apologies sorry it was mistake not intended and how to un bump it!
odklizec wrote:Hi,
I'm not exactly sure why you bumped this post? There is nothing more I can do for you without the additional details I asked you for.
ram