Micro Focus QTP (UFT) Forums
Hoe to select Date Picker? - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Hoe to select Date Picker? (/Thread-Hoe-to-select-Date-Picker)

Pages: 1 2


Hoe to select Date Picker? - Unleash Rajesh - 07-13-2011

hi..

Is it possible to use the properties of webedit and date picker in the same line...For reference, find the enclosed copy..

Used the code..

Code:
Browser("micclass:=Browser","title:= x").Page("micclass:=Page","title:= x").Image("micclass:=Image","file name:= calender.gif", "html tag:= IMG","name:= image").Setdate "date"

It throws an error stating,

QTP doesnot support this property or method..


RE: Hoe to select Date Picker? - rajpes - 07-13-2011

See what code recording generates for this.
I have a date picker which open a small new browser where i can see a small calender and click a day any any month of any year.

What is your scenario ?

By the way if date is a variable you shouldn't use quotes on it! (Setdate "date") and moreover Image object doesnt support setdate method!


RE: How to select Date Picker? - Unleash Rajesh - 07-13-2011

Date field is non-editable..Have to click the date picker image to select Date based on Months-> Years...


RE: Hoe to select Date Picker? - souvikghosh_diatm - 07-13-2011

Date field is non editable....and if you select the date from that date picker image then it reflect in that date field right???

If it is, then you can do it by simply clicking on that particular date picker image.

try following...

Code:
Browser("B").Page("P").Image("DatePickerProperty").Click
Browser("B").Page("P").Image("CalenderDayProperty").Click
Browser("B").Page("P").Image("CalenderMonthProperty").Click
Browser("B").Page("P").Image("CalenderYearProperty").Click

if necessary u can affix "Wait" after each line....Hope it will work....

Or else u have some other scenario...discuss it properly as i am unable to see ur attachment....

let me know whether it is working or not.....Drop me a mail on souvikghosh.diatm@gmail.com as i often check these replies...


RE: Hoe to select Date Picker? - Unleash Rajesh - 07-13-2011

Yes Yes.. it reflect in that date field.....

The code throws an error stating "Date Picker property is not found in the object repository" and same for the other...




RE: Hoe to select Date Picker? - rajpes - 07-13-2011

why dont you record and check what code it is generating, based on that write dp and remove that code


RE: Hoe to select Date Picker? - Unleash Rajesh - 07-13-2011

I had tried it... Its not functioning..Throws an error



RE: Hoe to select Date Picker? - souvikghosh_diatm - 07-13-2011

well u just do one thing....only add that particular date picker image in OR n send me the screen shot of OR in my email....souvikghosh.diatm@gmail.com.....let see whether i can help u farther or not......


RE: Hoe to select Date Picker? - Unleash Rajesh - 07-14-2011

Find the enclosed copy



RE: Hoe to select Date Picker? - rajpes - 07-14-2011

can you paste screenshot of what appears when you click on the calender image?
also paste the code generated during recording of picking a date in calender