![]() |
Adding days when you have a calendar Icon - 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: Adding days when you have a calendar Icon (/Thread-Adding-days-when-you-have-a-calendar-Icon) |
Adding days when you have a calendar Icon - Ann Hagglund - 04-18-2011 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! ![]() Ann Hagglund, Adecco, Sweden RE: Adding days when you have a calendar Icon - manishbhalshankar - 04-18-2011 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). RE: Adding days when you have a calendar Icon - Ann Hagglund - 04-19-2011 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 RE: Adding days when you have a calendar Icon - manishbhalshankar - 04-19-2011 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. RE: Adding days when you have a calendar Icon - Ann Hagglund - 04-20-2011 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 RE: Adding days when you have a calendar Icon - Ann Hagglund - 04-28-2011 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 I know that I have asked a couple of times but I can't solve it by myself. Greatful for help! ![]() Thank you in advance Ann Hagglund, Adecco Sweden RE: Adding days when you have a calendar Icon - vIns - 04-29-2011 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 RE: Adding days when you have a calendar Icon - raja219 - 05-02-2011 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") 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. RE: Adding days when you have a calendar Icon - Ann Hagglund - 05-02-2011 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 "mydate=day(now) Code: Browser("Njord Web Portal - Update").Page("Njord Web Portal - Update").Image("AccessKey") 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. |