Page 1 of 1

Calendar

Posted: Fri May 23, 2014 4:53 pm
by strannik
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.

Re: Calendar

Posted: Fri May 23, 2014 5:04 pm
by odklizec
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?

Re: Calendar

Posted: Fri May 23, 2014 5:17 pm
by strannik
Hi Pavel,

Here are snapshots for Month, Day and Year.

Thank you.

Re: Calendar

Posted: Mon May 26, 2014 7:59 am
by odklizec
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

Re: Calendar

Posted: Tue May 27, 2014 2:18 pm
by strannik
Thank you very much, Pavel. I will definitely try your suggestion.

Re: Calendar

Posted: Fri May 30, 2014 9:45 pm
by strannik
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.

Re: Calendar

Posted: Tue Jun 03, 2014 6:10 pm
by odklizec
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

Re: Calendar

Posted: Thu Jun 05, 2014 4:04 pm
by strannik
Thank you, Pavel.