Setup: Qtp - 9.1, Infragistics - 7.0, Addin - .net
(Following BPT method for QTP)
We are using following SwfCalendar object for selecting date from the calendar. SwfWindow ("A").SwfWindow ("B").SwfCalendar ("ultraMonthViewMultiMtgDatesEdi").Object.CalendarInfo.Appointments.Add Date, Date, "subject"For the above code it is highlighting the date from the calendar in the front end, when we taught it is selected but it is not selecting the date in the backend. This is happening since we are following Business Process Testing method. This is happening if try to call the script using QC or directly from QTP.We have tried the "SetDate" function which is not working from QC. It is working from QTP only. Need some suggestion on how to select the swfCalendar object? Appreciate your response at the earliest. Thanks
Just clarifying the question here, what you are asking is how you select a date using the MonthViewMulti. If you use the TestAdvantage proxy you can just call the SelectDate method off of the SwfCalandar object.
SwfWindow ("A").SwfWindow ("B").SwfCalendar ("ultraMonthViewMultiMtgDatesEdi").SelectDate "1/8/2008"
How this ends up replaying is by if the date is not in view, it scrolls it into view, then it will click on the date as if your user did. I am not entirely sure what you mean by you are experiencing the date being selected on the front end and not on the backend. But my assumption is what you are doing only triggers the date to be the ActiveDay and not actually selecting it or vise a versa, and your visuals look selected, but on the backend if you check it, it is not passing the check that you expect it to. SelectDate by acting like a click will automatically do both.
Let me know if this answers your question,
Michael
PS. If you need additional assistance on this could you confirm what version of NetAdvantage and TestAdvantage that you are using. As there is not a 7.0, it would be 7.1, 7.2, or 7.3, and to have our TestAdvantage proxys work correctly the TestAdvantage build must be the same as the NetAdvantage ones.
Hi Michael,
If i try to do the following using VBscript in QTP 9.1
SwfWindow("Public Inquiry Main Search").SwfCalendar("txtFromDate").SelectDate "1/1/2005"
i get the following error
"Object doesn't support this property or method: 'SwfWindow(...).SwfCalendar(...).SelectDate'"
If i want to do the following then
SwfWindow("Public Inquiry Main Search").SwfCalendar("txtFromDate").SetFocusSwfWindow("Public Inquiry Main Search").SwfCalendar("txtFromDate").SetDate Environment.value("FromDate")
OR
SwfWindow("Public Inquiry Main Search").SwfCalendar("txtFromDate").SetFocusSwfWindow("Public Inquiry Main Search").SwfCalendar("txtFromDate").SetDate "1/1/2006"
SwfWindow("Public Inquiry Main Search").SwfCalendar("txtFromDate").SetDate "1/1/2006"
Then i get the followng error:
Serialization Error
Line (8): "SwfWindow("Public Inquiry Main Search").SwfCalendar("txtFromDate").SetFocus".
Would really appreciate your help.
Thanks,
Trupti
Trupthi,
I think it's a date format problem. Try to give like 5-Dec-07 i.e., setdate "5-Dec-07" or selectdate "5-Dec-07"
let me know how did you go.
Cheers
Ram
Nah...doesnt work
Object doesn't support this property or method: 'SwfWindow(...).SwfCalendar(...).setdate'
Try this..
SwfWindow(...).SwfCalendar(...).Setdate "12-Apr-2015"
SwfWindow(...).SwfCalendar(...).Click("0,0")
Regards,
Shwetha