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
How to change value of Date-Time Picker
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
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
Saurabh Shrivastava
GE Global Research
Bangalore India
Did you try the following?i want to set the value 10:44:55 PM
Code: Select all
dtpCtrl.SendKeys("22{RIGHT}44{RIGHT}55");
Ranorex Team