Recording Error While Selecting Yesterdays Date

Ask general questions here.
sri
Posts: 10
Joined: Fri Oct 30, 2015 4:17 pm

Recording Error While Selecting Yesterdays Date

Post by sri » Fri Oct 30, 2015 5:51 pm

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

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3922
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Recording Error While Selecting Yesterdays Date

Post by odklizec » Thu Feb 11, 2016 6:19 am

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...

Code: Select all

System.DateTime currentDate= System.DateTime.Now;
System.DateTime yesterdaysDate = currentDate.AddDays(-1);
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?
Pavel Kudrys
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

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3922
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Recording Error While Selecting Yesterdays Date

Post by odklizec » Thu Feb 11, 2016 9:22 am

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.
Pavel Kudrys
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

sri
Posts: 10
Joined: Fri Oct 30, 2015 4:17 pm

Re: Recording Error While Selecting Yesterdays Date

Post by sri » Thu Feb 11, 2016 4:41 pm

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