18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
how to get time from time picker control
Hi,
My application is having the calender control. If we click on that it will open,we can select the date and also it is having the dragging buttons using these we can select the time(hours,minutes,seconds)also.
This is the code i got after recording of time
_click(_link(123)); // to select hours
_click(_link(124)); //to select minutes
_click(_link(125)); // to select seconds
If i playback the script it is giving the date but showing the time as 00:00:00
can anyone suggest me to solve this issue
Thanks
sreenivas
My application is having the calender control. If we click on that it will open,we can select the date and also it is having the dragging buttons using these we can select the time(hours,minutes,seconds)also.
This is the code i got after recording of time
_click(_link(123)); // to select hours
_click(_link(124)); //to select minutes
_click(_link(125)); // to select seconds
If i playback the script it is giving the date but showing the time as 00:00:00
can anyone suggest me to solve this issue
Thanks
sreenivas
Comments
can you please send me the screenshot of your page where you are facing an issue. also tell me your objective.
-Ashish
Thanks for your response
_dragDropXY(_link(0, _in(_div("/Time.*Hour/"))), 60, 0, true);
_dragDropXY(_link(1, _in(_div("/Time.*Hour/"))), 40, 0, true);
_dragDropXY(_link(2, _in(_div("/Time.*Hour/"))), 20, 0, true);
By using these lines of code instead of these
_click(_link(123)); // to select hours
_click(_link(124)); //to select minutes
_click(_link(125)); // to select seconds
i can select time in Timer controller.Here 60,40,20 used to select time in hours,minutes,seconds respectively.
After that i tried to make these generic like this by putting $Hours,$Minutes,$Seconds in excel.
_dragDropXY(_link(0, _in(_div("/Time.*Hour/"))), $rs[0]["$Hours"], 0, true);
_dragDropXY(_link(1, _in(_div("/Time.*Hour/"))), $rs[0]["$Minutes"], 0, true);
_dragDropXY(_link(2, _in(_div("/Time.*Hour/"))), $rs[0]["$Seconds"], 0, true);
For playback of the script whatever values i gave,it is showing 23:59:59.
This is the problem facing now
Thanks
isreenivas
Just google "time picker control" and maybe add "html" or "javascript" and you should find something helpful.