From a user:
Site: 0P00007G3N | Bentham Syndicated Loan Fund Historical Data - Investing.com AU
This page offers a datepicker to filter the content. It appears as a field of the form “d/m/y - d/m/y” with a table icon on its right. Clicking either brings up a “Custom dates” frame with “Start Date” and an “End Date” text input fields, with calendars alongside, marking the extent of the selection as entered with each keystroke in either of these text fields. When done, the operator clicks the “Apply” button (bottom right corner) to generate the date-filtered content.
The macro recorder generated the following:
open | {site URL as per above}
click | id=widgetFieldDateRange
type | | 10/01/2025
type | | 01/02/2025
click | linkText=Apply@POS=3
Running this macro gagged as the “type” command had no target. The UI however offered a menu of targets for this command, of the form id=, xpath= and css=. I used all three and while the macro completed successfully, the specified date filter was ineffective, I still got the default content.
As a previous iMacros user, I had a similar problem with this site and in the end used its emulation of direct screen input as follows:
- Upon entry into the datepicker, focus automatically goes to the Start Date field, cursor is at the end of the text.
- I "erase"d the field with backspaces then replaced the content.
DS CMD=KEY CONTENT=10 x {BACKSPACE}
DS CMD=KEY CONTENT=10/01/2025
- Then moved to the End Date field, instantiated that then passed the ENTER key to trigger the “Apply” action as per the above.
EVENT TYPE=CLICK SELECTOR="#endDate" BUTTON=0
DS CMD=KEY CONTENT=10 x {BACKSPACE}
DS CMD=KEY CONTENT=01/02/2025{ENTER]
As a new user to UI.Vision, I tried various permutations of the XClick and XType commands, but alas with no luck. Hoping you can help me.
Thanks.