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.
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.
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.
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.
04-28-2011, 05:12 PM (This post was last modified: 04-28-2011, 05:14 PM by Ann Hagglund.)
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.
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
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.
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.