Micro Focus QTP (UFT) Forums
How to capture the DATE from the Calendar control in a sharepoint application - 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: How to capture the DATE from the Calendar control in a sharepoint application (/Thread-How-to-capture-the-DATE-from-the-Calendar-control-in-a-sharepoint-application)



How to capture the DATE from the Calendar control in a sharepoint application - Simr - 02-16-2012

Getting error -
Failed to run the test due to an unknown error.
For line-
Line (17):
Code:
"Browser("Test Home").Page("Add Home Standard").Frame(DatePicker).webtable("M").Link("name:=" + "&16").Click"

I am trying to select a date from the calendar on a sharepoint based application. Although, it opens the calendar and points to the date as 16 Feb 2012, but is not able to select and capture the date in the desired box. Attaching the screenshot as well.
Please let me know how to capture the DATE from the calendar.


RE: How to capture the DATE from the Calendar control in a sharepoint application - surya_7mar - 02-19-2012

you should use the calender popup object... i can get you the code tomorrow


RE: How to capture the DATE from the Calendar control in a sharepoint application - Simr - 02-21-2012

Thanks for replying.
Could you please send the Code as well.
I am trying to use the below code. Let me know if there is any mistake in that.
Code:
Browser("ABC Home").Page("Add Policy").WebList("ctl00$SPWebPartManager1$g_9142").Click 5,5

Browser("ABC Home").Page("Add Policy").Image("Select a date from the").Click 10,5

Browser("ABC Home").Page("Add Policy").Frame(DatePicker).webtable("M").webelement("Date").FireEvent"onmouseover"
wait 1

Regards,
Simr


RE: How to capture the DATE from the Calendar control in a sharepoint application - visitjaga - 09-17-2012

Hi ,

Please see the below script,which I recorded.
Code:
Browser("Welcome to the website").Page("Date").Frame("ContentIFrame").Image("img_calendar").Click
Browser("Welcome to the website").Page("Date").Frame("ContentIFrame").Link("17").Click

In the above script , I need to select current date for each run.Can anyone provide me suggesstion , how to get current date, as the date is displayed as link.I am confused little bit
Plz give it in Descriptive programming

Note:1.Only able to select the date.Not able to enter manually.