How to select dynamic list item from dropdown and then click on it

Problem Statement - How to select dynamic list item from dropdown and then click on it
Scenario: Perform a search on the field, select an item from the drop-down menu, and ensure that the selected item is entered into the search field. Subsequently, the ‘Next’ button should be enabled after the item is successfully entered into the field. Kindly provide a sample script or guide me on how to script this process.

I have code which is working till dropdown items are being listed See below

execAndWait el = document.querySelector("iframe[id=frameFirst]").contentDocument.querySelector("iframe[id=frameSecond]").contentDocument.querySelector("dummy input"); proto = Object.getPrototypeOf(el); set = Object.getOwnPropertyDescriptor(proto, "value").set;, "dummy"); el.dispatchEvent(new Event("input", { bubbles: true }))


Hello Donald,

Please refer to this doc for more information:


Hi Atib this was posted by me not by Donald I just cc him for his input on this problem.
Secondly, I have gone through this document but I could not get any help on this. No example are provided using those commands Custom Scripting | WebPageTest Documentation so it is difficult script. If you have any solution for the above problem statement please let me know thanks.