I m having the following issue:
(1) I cannot playback the step of clicking on a calendar icon. I went to view source and checked the name and id of the calendar. The name and id of calendar are changing everytime. If at all I am able to click the calendar I cannot playback the step of selecting a different year.
Can I somehow set the date without actually clicking on the calendar and selecting a date? The text field beside the calendar is read only.
I m new to Telerik. Please help.
P.S. Please see below the error that I get.
Failure Information: ~~~~~~~~~~~~~~~Unable to locate element. Details: Attempting to find [Html] element using Find logic (Html): [id 'Exact' image289] AND [tagname 'Exact' img]Unable to locate element. Search failed!Element was found by backup search only! We recommend editing the element to correct the primary find expression. Backup search: 'xpath=/html/body/form/table/tbody/tr/td/div/table/tbody/tr/td/p/a/img'
7 Answers, 1 is accepted
From my experience, automating calendar clicks on specific dates (when no text field exists) is way too much work for the actual task you are trying to accomplish.
Please find the html of the calendar as requested.
Thank you for contacting Telerik Support, please excuse our delay in getting back to you.
Options for dealing with this scenario:
1) Even though the text field is read only, it may be suitable to use the SetText() method, which is essentially an 'Enter text' step with SimulateRealTyping disabled. To work around the fact that you cannot record such a step with the control disabled, please add the textbox element to your project explicitly via the 'Add to Project Elements' option from the Elements Menu. Once added just find it in the Elements Explorer, use the Steps Suggestions to add an Enter text step to your test and change the Text step property to the desired date (eg. 2013-12-27) you with to enter. This will be the easiest method but may not work depending on your application, if it doesn't try the next option.
2) Change how each element involved in clicking on the correct dates is found (link for example) in such a way as to not include dynamic id's, instead use text content or other unique properties to each element.
If neither option helps, please attach a step failure log for us to examine by double clicking the red X next to a failing step (like the one in your original post) and choose the option to Export. Then attach the created ZIP to this post.
The first option worked. Thanks very much. :)