Unable to select option from autocomplete list without hovering

I found this old article describing a similar problem

I then recreated the solution in Katalon Recorder like this:

open | https://jqueryui.com/autocomplete/ | |
selectFrame | index=0 | |
click | id=tags | |
type | id=tags | ja |
waitForTextPresent | JavaScript | |
mouseOver | //li[. = "JavaScript"] | |
click | //li[. = "JavaScript"] | |
assertValue | id=tags | JavaScript |

Note that it took me a while to work out the XPath for the mouseOver and click commands
On an internal system, I also successfully used the XPath:

//html/body/ul/li/a[. = "Art"]

Also note that the text to look for is case-sensitive, an XPath with the text “Javascript” fails.

1 Like