Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding days when you have a calendar Icon
#1
Not Solved Wink 
Hi, In my applicaiton the date is set my clicking a calendar image. I would like to add 7 days to todays date. As I can't type a date as I'm forced to click on the image I don't know how to do.

I have attached images of the calendar in my application.

Please help! Smile

Ann Hagglund, Adecco, Sweden


Attached Files
.doc   AddingDaysToCalendar.doc (Size: 100 KB / Downloads: 108)
Reply
#2
Not Solved
Hi Ann,

Is the Go To field non-editable. Also please let me know the object properties of the objects in calendar (Month, Year, Date objects).
Reply
#3
Not Solved
Hi, Thank you for your answer. Yes it is Go To field non-editable I think. I attach an image showing the object spy and also the recording when I'm manually setting the dates. Once again, I really appreciate your help!
Please tell me if you need more information.

Best regards,
Ann Hagglund


Attached Files
.doc   AddingDaysToCalendar_1.doc (Size: 59 KB / Downloads: 114)
Reply
#4
Not Solved
Hi Ann,

Try setting the date directly in the webedit. In Recording mode, click the webedit and type the required date in the preferred format. Check if it gets recorded.
Please let me know in case it is not working.
Reply
#5
Not Solved
Hi again,
I have tried that but you can't write anything in the Wededit. You must to use the Calendar. I can set it directly in other places in my application.

Thank you for your help!
Ann
Reply
#6
Not Solved
Hi again! I have tried and read as much as I can about this but I didn't manage to solve it. What I have seen, every figure in the calendar is a link.

Below you see my recording when I selected 29th of April.
Todays date (today 28th of April) is always default.

Code:
Browser("Njord Web Portal - Update").Page("Njord Web Portal - Update").Image("...").Click
Browser("Njord Web Portal - Update").Page("Njord Web Portal - Update").WebElement("PrevNextJanFebMarAprMayJunJulA_2").FireEvent "onmouseover"
Browser("Njord Web Portal - Update").Page("Njord Web Portal - Update").WebElement("Fr").FireEvent "onmouseover"
Browser("Njord Web Portal - Update").Page("Njord Web Portal - Update").Link("8").FireEvent "onmouseover"
Browser("Njord Web Portal - Update").Page("Njord Web Portal - Update").WebElement("1_9").FireEvent "onmouseover"
Browser("Njord Web Portal - Update").Page("Njord Web Portal - Update").Link("29").FireEvent "onmouseover"
Browser("Njord Web Portal - Update").Page("Njord Web Portal - Update").Link("29").Click

I know that I have asked a couple of times but I can't solve it by myself.

Greatful for help!Smile

Thank you in advance
Ann Hagglund, Adecco Sweden
Reply
#7
Not Solved
Hi ... even if the textbox readonly, we can access the object properties and modify.
Code:
Browser("Log In").Page("Log In").WebEdit("name:=lname").Object.readonly = false  ' make it editable
Browser("Log In").Page("Log In").WebEdit("name:=lname").set "LastName"  ' set the value
Browser("Log In").Page("Log In").WebEdit("name:=lname").Object.readonly = true   ' make it readonly again
Reply
#8
Not Solved
Please try to find out the object properties of the calender and then use 'DateAdd' function to add dates.

Ex:-
Code:
Object = browser("Properties").Page("Properties").Image("Calender Properties")
variable = object.Dateadd("Interval",Number, Date)
msgbox variable

Here Interval represents: "d" or "m" or "Y"
Number represents: how many days or months or years you want to enter
Date represents the date which you have.
Reply
#9
Not Solved
Sorry to bother you again!
I don't get it to work.

If I add a date manually, e.g. 12th of May the code looks like:

Code:
Browser("Njord Web Portal - Update").Page("Njord Web Portal - Update").Image("...").Click
Browser("Njord Web Portal - Update").Page("Njord Web Portal - Update").Link("12").Click
I have written the following code due to your answer: (I might have done it in a wrong way)

"mydate=day(now)

Code:
Browser("Njord Web Portal - Update").Page("Njord Web Portal - Update").Image("AccessKey")
(Access key i found out with the Object Spy function)

Variable = Dateadd "d", 1, mydate
msgbox.variable

I have also tried to set in today's date (02/05/2011) but it is the same result:
I receive the following error message, see below.


Attached Files Image(s)
   
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  QTP not recognizing date calendar kQTPs 1 3,608 12-20-2017, 11:21 PM
Last Post: harikrishna
  Pages and Frames adding _1, _2, _3... zunebuggy 1 1,660 05-30-2017, 12:17 AM
Last Post: Vichu M J
  Adding negative amount in webedit Rose 1 2,133 06-30-2016, 09:34 PM
Last Post: babu123
  Adding data into rows that add dynamically with setcelldata azar81 4 5,916 04-13-2015, 05:24 PM
Last Post: vidya2k2
  select a date from pop-up calendar Dertjon 1 5,758 05-13-2014, 02:29 PM
Last Post: Ankur

Forum Jump:


Users browsing this thread: 1 Guest(s)