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; set.call(el, "dummy"); el.dispatchEvent(new Event("input", { bubbles: true }))