| View previous topic :: View next topic |
| Author |
Message |
saurabh
Joined: 20 Jul 2007 Posts: 20 Location: India
|
Posted: Thu Aug 02, 2007 8:34 am Post subject: How to change value of Date-Time Picker |
|
I want to change the value of Date-Time Picker in my GUI automation.Like if current date is 8/2/2007 in Date-Time Picker i want to change it 4/1/2008 .I am trying with set_text() method as given code but its not working.I am using RanorexPro1.2 Version.
Application::Start("Alarms.exe");
form = Application::FindFormTitle("Alarms manager",Ranorex::SearchMatchMode::MatchExact,true,5000);
DateTimePicker* dtpCtrl = form->FindDateTimePicker("FromDTP");
String* DateValue = "4/1/2008 ";
dtpCtrl->set_Text(DateValue);
Please guide me and provide me proper code to do the same as soon as possible.
Thanks in Advance |
|
| Back to top |
|
 |
saurabh
Joined: 20 Jul 2007 Posts: 20 Location: India
|
Posted: Thu Aug 02, 2007 1:53 pm Post subject: How to change AM to PM in DateTime Picker |
|
I have got the solution for above problem i am using code
dtpCtrl->SendKeys(sz->ToString());
dtpCtrl.SendKeys("11{RIGHT}01{RIGHT}2007");
Now if i want to set the Time like Date as given here so how can chnage AM to PM or vice versa.Above code working fine to change the time but not converting AM to PM
like 12:34:56 AM i want to set the value 10:44:55 PM
Please provide the code for the same _________________ Regards,
Saurabh Shrivastava
GE Global Research
Bangalore India |
|
| Back to top |
|
 |
admin Site Admin
Joined: 05 Jul 2006 Posts: 351
|
Posted: Thu Aug 02, 2007 8:09 pm Post subject: |
|
| Quote: |
| i want to set the value 10:44:55 PM |
Did you try the following?
Code: click into code to enlarge
dtpCtrl.SendKeys("22{RIGHT}44{RIGHT}55");
Jenö
Ranorex Team |
|
| Back to top |
|
 |
|