Posts: 5
Threads: 1
Joined: Mar 2011
Reputation:
0
03-31-2011, 02:13 PM
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
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
03-31-2011, 04:54 PM
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.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
03-31-2011, 05:44 PM
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.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Posts: 5
Threads: 1
Joined: Mar 2011
Reputation:
0
03-31-2011, 06:07 PM
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
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
03-31-2011, 06:31 PM
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.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Posts: 5
Threads: 1
Joined: Mar 2011
Reputation:
0
03-31-2011, 06:44 PM
Thanks for taking it on such priority..
Please send me the code whenever you get the time.. I am testing for date control..
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
03-31-2011, 06:52 PM
No problem my friend says the neurons
they cant stop you thanking for giving time
Allright, tommorow then.
PS: thank you for those quick responses. Fullfills my motive of helping.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
04-01-2011, 08:15 AM
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)
Month = Split("24 Apr 2010")(1)
Year = Split("24 Apr 2010")(2)
I am unsure which of your link clicks the day, but you can try the below,
Browser("Browser").Page("Event Details").Link("miclass:= link","value:="&day).Submit
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?
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Posts: 5
Threads: 1
Joined: Mar 2011
Reputation:
0
04-01-2011, 11:53 AM
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