Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Calender control is having all values as link, unable to retrieve that from datatable
#1
Solved: 11 Years, 3 Months ago
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
Reply
#2
Solved: 11 Years, 3 Months ago
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.
Reply
#3
Solved: 11 Years, 3 Months ago
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
Browser("Browser").Page("Event Details").WebElement("WebTable").Click
Browser("Browser").Page("Event Details").Link("25").Submit
Browser("Browser").Page("Event Details").Link("00").Submit
Browser("Browser").Page("Event Details").WebElement("WebTable").Click
Browser("Browser").Page("Event Details").Image("calendar_2").Click
Browser("Browser").Page("Event Details").Link("25").Submit
Browser("Event Details").Page("Event Details").WebElement("WebTable_2").Click
Browser("Event Details").Page("Event Details").Link("2").Click
Browser("Event Details").Page("Event Details").Link("AM").Click
Browser("Event Details").Page("Event Details").Link("Set").Click
Browser("Event Details").Page("Event Details").Link("7").Click
Browser("Event Details").Page("Event Details").Link("PM").Click
Browser("Event Details").Page("Event Details").Link("Set").Click

Thanks
Gunjan


Attached Files Image(s)
   
Reply
#4
Solved: 11 Years, 3 Months ago
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.
Reply
#5
Solved: 11 Years, 3 Months ago
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
Reply
#6
Solved: 11 Years, 3 Months ago
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.
Reply
#7
Solved: 11 Years, 3 Months ago
Thanks for taking it on such priority..

Please send me the code whenever you get the time.. I am testing for date control..
Reply
#8
Solved: 11 Years, 3 Months ago
No problem my friend says the neurons Smile they cant stop you thanking for giving timeSmile
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.
Reply
#9
Solved: 11 Years, 3 Months ago
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.
Reply
#10
Solved: 11 Years, 3 Months ago
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Click on calender on specific date. venkatesh9032 1 3,859 12-02-2015, 07:30 PM
Last Post: nistalaramesh
  Date Picker Issue - Unable to select date link dynamically rajkumarsm 1 5,147 09-20-2014, 09:31 AM
Last Post: rajkumarsm
  Unable to read numeric values from WebTable into Datatable Akhila 2 4,673 11-26-2013, 03:43 PM
Last Post: Akhila
  QTP Automation: How to retrieve Reporter.Reportevent Message scsenthil 1 5,386 11-14-2013, 07:51 PM
Last Post: spannerj
  How to retrieve ArrayList saved in Environment Variable Gautam26 8 4,675 11-07-2013, 08:26 PM
Last Post: ssvali

Forum Jump:


Users browsing this thread: 1 Guest(s)