javascript datetimepicker object and QTP
♥ 0 |
Our developers have added a calendar object to our application. The calendar object is a javascript datetimepicker object (see http://trentrichardson.com/examples/timepicker). The calendar object is the usual calendar layout (click on a calendar day to select that date), plus it has a horizontal slider for the hour or the day and a horizontal slider for the minutes. If you click in the slider trough for the hour slider, it jumps the time ahead by 3 hours (or behind by 3 hours, depends on where you click). You can also grab the slider handle and drag it to the desired hour. The minutes slider is similar – click in the trough and it moves the minutes +-15 minutes in time. You can also grab the slider handle and drag it to the desired minute. Once you’ve chosen a date and moved the sliders, you click on an OK button to apply the date/time changes in the app. The problem is that I have no idea how to proceed. The developer says that "all I have to do" is invoke the datetimepicker object via javascript and pass it parameters to set the hour, or minute, or day, etc. I can locate the "datetimepicker" class in the web page via descriptive programming, but now what? I tried (from the watch window) "children(0).object.datetimepicker("hour:=12")" but QTP complained that "datetimepicker" wasn’t known. Could I create an HTML string that contains javascript function and somehow execute it against this page using QTP maybe – like this: document.write("") (my syntax may be screwed up here, but at least you get the idea – I hope). I want to be able to just call the datetimepicker object, pass it the date and time info I want to use, and have it set that date/time without my having to drag slider handles, click on slider troughs, etc. anyone run into this kind of crazy stuff before? I am at a loss as to how to proceed.
Marked as spam
|