Record mouse click on calendar object on the web - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: Record mouse click on calendar object on the web (/Thread-Record-mouse-click-on-calendar-object-on-the-web) |
Record mouse click on calendar object on the web - Cecil - 01-23-2008 Hi I'm trying to record a test on a web application where I need to set a start and end date to it using the calendar object. After finished record, when I test run the recorded test, the click that was recorded didnt actually actioned against the calendar object, so the test run keep failing. Can anybody help. Cheers Kathy RE: Record mouse click on calendar object on the web - vramu1 - 01-23-2008 Kathy, I also faced the same issue with .Net application. Use Object Repositary to store the calender object and then write the calender statement. go to Resources --> Object Repositary Object Repositary window opens from there go to Object --> Add objects to local Then you can see QTP window will disappear untill you select the calendar object in your application. Click on Ok in the pop-up window to add the calendar object in the repositary. Now switch to Expert View to write the calendar statement. some thing like below Code: SwfWindow("window").SwfComboBox("cmb").Select Security Hope this will help you. let me know how did you go. Cheers Ram. RE: Record mouse click on calendar object on the web - Cecil - 01-31-2008 Hi Ram Sorry for the delay in responding, been away on holiday. I tried your suggestion then run the test script. It didnt work. I got the Run Erro: Type mismatch: 'SwfWindow' message. What I notice when I did the Add to Repository action, it added a WebElement: < , it didnt seem to add any calendar object. Any suggestion? Cheers Kathy RE: Record mouse click on calendar object on the web - Rajashekar Gouda - 01-31-2008 Hi Kathy, Is it compulsory to write the script by "Recording" only? If not the best and easy way to solve this issue is go for DP. Code: Browser("sdfsd:=dfs").Page("dfsdre:=sdfS").Webedit("cmbdate:=sdfsd").SetDate "12-Dec-2007" Regards Raj RE: Record mouse click on calendar object on the web - Cecil - 02-01-2008 Hi Raj, No it is not compulsory to use the recording only. Unfortunately I'm very new with QTP, just completed the introduction on basic QTP not long ago and they didn't go very deeply on writing the scripts. Though I'm very keen to give it a shot. Cheers Kathy RE: Record mouse click on calendar object on the web - Xandel - 02-20-2008 Hi Kathy, I'm sure you've figured your error out by now, but if not maybe I can help. I'm working with a web application the requires calendars as well. Sometimes Quicktest just dosen't record right on the first try for some reason. I would try rerecording that calendar and deleting the old one, if you dont' know how to do that just ask. However there is an issue with some web calendars ,fyi; if you record a specific date and run the test say a month and a week later or so where the date is past the date recorded it may give you an error and fail. I had to rerecord that part of all my tests, if you are permitted and there is an option to enter in a manual date (eg. yyyy/mm/dd format) and make it a parameter I would recomment it. Thanks, Xandel RE: Record mouse click on calendar object on the web - Cecil - 02-21-2008 Hi Xandel, Thank you for your reply. No, I havent actually solved this particular problem, decided to move along with other scripts first. Anyway, I have tried your suggestion, it sort of move a bit further then before. Originally the calendar object didnt even get to be opened. Now it opens the calendar, but then it closes straight away, without doing the next actions on the script. On my script, after the calendar object open, I click on the Month link to open the future months & years, then click on the Dec link then click on Apply, so when I'm back on the calendar object I can select 31/Dec. Can you suggest how I can keep the calendar object open and do the next steps on the script? Cheers Kathy RE: Record mouse click on calendar object on the web - Xandel - 02-21-2008 Hi Kathy, I'm not sure how to do that, sorry, but if I happen to figure it out I will let you know. I think Quicktest has a mind of its own and will only play back whatever you record, so if you need to keep the calendar open for the rest of the test you may have to record it that way. I'll let you know if I find something out. Thanks, Xandel |