Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
sailatha
Posts : 6
Join date : 2011-06-25

selenium RC Empty selenium RC

Sat Jun 25, 2011 7:53 pm
how to sort date using selenium rc
can any one help me
avatar
Arthur
Active particpant
Active particpant
Posts : 23
Join date : 2011-05-23
Location : Pune

selenium RC Empty Re: selenium RC

Mon Jun 27, 2011 1:14 pm
Please give details such which language, how the sort must be, date format etc.


sailatha wrote:how to sort date using selenium rc
can any one help me
avatar
sailatha
Posts : 6
Join date : 2011-06-25

selenium RC Empty Re: selenium RC

Thu Jun 30, 2011 12:15 am
Hi,

The language is JAVA. Sort can be Ascending or Descending and Date format should be MM/DD/YYYY.

Thanks in advance.
regards
Sailatha
avatar
Arthur
Active particpant
Active particpant
Posts : 23
Join date : 2011-05-23
Location : Pune

selenium RC Empty Re: selenium RC

Thu Jun 30, 2011 5:57 pm
Hi,
You can use the following method:
1. convert the date into string
SimpleDateFormat dateformatMMDDYYYY = new SimpleDateFormat("MMddyyyy");
StringBuilder nowMMDDYYYY = new StringBuilder( dateformatMMDDYYYY.format( dateNow ) );

2.
split the things such as mm, dd, yyyy.

3. Use sort method (array.sort(sortNumber))

also you can see the site is it helpful to you
http://javascript.about.com/b/2010/04/02/date-array-sort.htm
http://javascript.about.com/library/blsort3.htm
http://javascript.internet.com/forms/date-sorter.html
Sponsored content

selenium RC Empty Re: selenium RC

Back to top
Permissions in this forum:
You cannot reply to topics in this forum