![]() |
Calender control is having all values as link, unable to retrieve that from datatable - 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: Calender control is having all values as link, unable to retrieve that from datatable (/Thread-Calender-control-is-having-all-values-as-link-unable-to-retrieve-that-from-datatable) |
Calender control is having all values as link, unable to retrieve that from datatable - gunjan_fcs - 03-31-2011 Hi All, I need a help to select the value of date through datatable but the calendar control correspondent towards that field is having the value as link which has to be stated statically in scripting, please suggest how to script to get the value of the date field from calender with the means of datatable in place of hard code scripting of that value. Thanks in advance, Gunjan RE: Calender control is having all values as link, unable to retrieve that from datatable - basanth27 - 03-31-2011 I am lost. Help me find my way. Your calender control date value is a link? You would want to select the date using the value you have on your datatable? Screenshot of your calender object and the code you have used will help. RE:Calender control having all values as link, unable to retrieve from datatable - gunjan_fcs - 03-31-2011 Thanks for your response!!! Yes you are right, my calender control date value is a link, Yes right, I want to insert the value of date using the value kept in Datatable.. Code i used for hardcode is :- Code: Browser("Browser").Page("Event Details").Image("calendar").Click Thanks Gunjan RE: Calender control is having all values as link, unable to retrieve that from datatable - basanth27 - 03-31-2011 Gunjan - While my neurons are processing your request, here is a quickie, 1. Can you enter the date manually into the date box? I mean, without using the calendar control. RE: Calender control is having all values as link, unable to retrieve that from datatable - gunjan_fcs - 03-31-2011 Thanks for your post ... Yes manually date is allowed but i want that to be selected from calender only.. Please keep your neurons working ... and help Thanks Gunjan RE: Calender control is having all values as link, unable to retrieve that from datatable - basanth27 - 03-31-2011 What is your test for ? To enter date and proceed further or to test the calendar control? Here is what i think, 1. Date and month are in links within a webelement leaving fewer options. You can try with childitem for webelement but i doubt it will work. 2. Descriptive program your links. Set the date value in the datatable. When you read it in your script, split such that you will have day month year etc in each variable. Pass that variable as the value parameter. I am replying through a phone and hence cannot write a code. Let me know if you understood else i will sample a flow tommorow. RE: Calender control is having all values as link, unable to retrieve that from datatable - gunjan_fcs - 03-31-2011 Thanks for taking it on such priority.. Please send me the code whenever you get the time.. I am testing for date control.. RE: Calender control is having all values as link, unable to retrieve that from datatable - basanth27 - 03-31-2011 No problem my friend says the neurons ![]() ![]() Allright, tommorow then. PS: thank you for those quick responses. Fullfills my motive of helping. RE: Calender control is having all values as link, unable to retrieve that from datatable - basanth27 - 04-01-2011 Lets say you are storing date as 24 April 2010 on the datatable. On your script you can split this up as, Code: day = Split("24 Apr 2010")(0) For the year and the month the selection is going to involve some programming. Here is the logic you may want to try, 1. Using the GetRoproperty retrieve the current month and year. 2. Based on the input you would want to supply you will have to click the > links. 3. Confirm using the GetRoproperty that the desired month is set. 4. Then select the day. 5. Then simply click on OK. So far, so good? RE: Calender control is having all values as link, unable to retrieve that from datatable - gunjan_fcs - 04-01-2011 Hi Thanks for the post, but I didnt understand why you took the split function ? And about the RO property as well i didnt get the concept of taking it as well. Please clarify. Thanks Gunjan |