Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Record mouse click on calendar object on the web
#1
Not Solved
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
Reply
#2
Not Solved
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
'calendar statement
SwfWindow("window").SwfCalendar("cmbdate").SetDate "12-Dec-2007"

Hope this will help you. let me know how did you go.

Cheers
Ram.
Reply
#3
Not Solved
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
Reply
#4
Not Solved
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
Reply
#5
Not Solved
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
Reply
#6
Not Solved
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
Reply
#7
Not Solved
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
Reply
#8
Not Solved
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  UFT 14.53 not able to record steps of web application rupesh doshi 3 2,554 10-10-2019, 01:50 PM
Last Post: rupesh doshi
  Getting background color of an object on mouse over Surya 2 3,716 06-27-2018, 08:51 PM
Last Post: vensas3181
  QTP not recognizing date calendar kQTPs 1 3,459 12-20-2017, 11:21 PM
Last Post: harikrishna
  Web Object Unique ID Number zunebuggy 0 1,462 07-10-2017, 05:37 PM
Last Post: zunebuggy
  click each web link in a page using Index or other method in QTP smeijer 13 23,678 04-29-2017, 04:53 PM
Last Post: kowshik

Forum Jump:


Users browsing this thread: 1 Guest(s)