I came along a situation where I needed a “focus” on an HTML tag. This was due the fact that the dropdown menu I was searching was Ajax generated (HTML code populated on demand). Therefore I had to write an automation to scroll through the dropdown entries to the very end to have all HTML code populated. I usually do that with “Click” command on the table cells which works fine with tables, even there nothing really to click on from the User perspective point of view.
However this dropdown menu click would trigger a link to open which i needed to avoid. So rather than clicking a dropdown menu tag to initiate a load for new HTML code in my dropdown menu I needed to go with a “focus” command.
I got around this with a javascript using “ExecuteScript” in a loop where ${myDropdownValuePosition} points to the next position in my dropdown menu:
document.querySelector(“#Users > div.row.searchableTable-data-row-${myDropdownValuePosition}.data > input”).focus();
It would be cool to have something like this as a native Kantu command.
Hendrik