Calendar

Mobile Testing, Android App Testing.
strannik
Posts: 60
Joined: Tue Apr 29, 2014 3:00 pm

Calendar

Post by strannik » Fri May 23, 2014 4:53 pm

Hi,

I'm testing mobile application using firefox browser with simulator for iOS. My problem is I can't select date, month and year in calendar to perform data driven testing. To select date, month and year I need to scroll them and after that select button set. There is any way to use data driven approach? Ranorex XPath doesn't display actual values of selected date, month and year. I'm attaching image of calendar.

Thank you.
Attachments
calendar.PNG
calendar.PNG (56.85 KiB) Viewed 1185 times

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

Re: Calendar

Post by odklizec » Fri May 23, 2014 5:04 pm

Hi,

Any chance you can post a snapshot of the calendar? Here is how you can create the snapshot...
http://www.ranorex.com/support/user-gui ... files.html

In any case, if there is no property displaying the day/month/year values, I think it will be very hard, if not impossible, to automate your scenario. Your best hope is to ask the application developers to add such properties. But even this may not be enough. The question is, if these controls would accept setting the values without scrolling the controls?
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

strannik
Posts: 60
Joined: Tue Apr 29, 2014 3:00 pm

Re: Calendar

Post by strannik » Fri May 23, 2014 5:17 pm

Hi Pavel,

Here are snapshots for Month, Day and Year.

Thank you.
Attachments
day.rxsnp
(286.69 KiB) Downloaded 108 times
year.rxsnp
(286.7 KiB) Downloaded 101 times
month.rxsnp
(286.7 KiB) Downloaded 106 times

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

Re: Calendar

Post by odklizec » Mon May 26, 2014 7:59 am

Hi,

The good news about your calendar is that you can validate day/month/year, even the week day! All these values are displayed via InnerText properties, using elements found here (for trip start/end dates):
/dom[@domain='qa.caasco.com']//div[#'main']/div[4]/div[1]/div[1]/div[@class='trip-date-inner-content']
/dom[@domain='qa.caasco.com']//div[#'main']/div[4]/div[2]/div[1]/div[@class='trip-date-inner-content']

or for birth date:
/dom[@domain='qa.caasco.com']//div[#'divBirthDates']/div[1]/div/div[@class='birth-date-inner-content']

Now the bad news. It seems the date selector (displayed in your screenshot and snapshot) is not recognized by Ranorex. And I don't think you can set the date by using SetValue command. However, in the snapshots you published, there can be found something called "jdpicker_w", which elements appear to be somehow related to the date selection? Some Span texts even suggest it should be possible to use kayboard shortcuts (Page-Up/Down or Ctrl+Page-Up/Down) to select the date values? I can only guess that the day number could be set by Up/Down keys? Just give it a try ;)
/dom[@domain='qa.caasco.com']//div[#'main']/div[4]/div[2]/div[5][@class='jdpicker_w']
set_date.png
set_date.png (77.04 KiB) Viewed 1166 times
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

strannik
Posts: 60
Joined: Tue Apr 29, 2014 3:00 pm

Re: Calendar

Post by strannik » Tue May 27, 2014 2:18 pm

Thank you very much, Pavel. I will definitely try your suggestion.

strannik
Posts: 60
Joined: Tue Apr 29, 2014 3:00 pm

Re: Calendar

Post by strannik » Fri May 30, 2014 9:45 pm

Hi Pavel,

Could you please give me examples how to validate day/month/year, even the week day. I was searching the internet and found nothing. If you remember I'm a new user of Ranorex. If it is possible step by step instructions, please.

Thank you.

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

Re: Calendar

Post by odklizec » Tue Jun 03, 2014 6:10 pm

Hi,

In the attached zip you can find a very simple project that should give you a hint how to validate some elements on the web page. If you run this project, it will load an example web page with calendar and validated some elements.

Validated values are stored in a simple data table (right click TestCase and from the appeared menu select "Data Source"). Each column of the data table is assigned to appropriate module variable. Each variable is then used in recording module as a "Match Value" parameter.

The recoding contains also date/time validation for your snapshot. It's supposed to validate the Departure date/time values. Just disable the example validation rows and enable the currently disabled rows. Don't forget to change the Open browser path action (with your path) and of course, change the data table values according your needs. Hope this helps? ;)
DateTime.zip
(15.39 KiB) Downloaded 106 times
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

strannik
Posts: 60
Joined: Tue Apr 29, 2014 3:00 pm

Re: Calendar

Post by strannik » Thu Jun 05, 2014 4:04 pm

Thank you, Pavel.