This is another very common issue, especially with modern web applications built using React, Angular, Vue, Material UI, Select2, Kendo, etc.
The key thing to understand is:
WebUI.setText() only changes the value of the field. It does not always trigger the JavaScript events that a real user interaction would trigger.
Issue which you are facing is briefly explanied below
The issue is likely due to the difference between manual user interaction and automation behavior. When a user types into the Vendor field, multiple browser events (like keydown, input, change, and blur) are triggered, which the application relies on to populate the dependent Product dropdown. However, when Katalon uses setText, it directly sets the value without triggering all the necessary JavaScript events. As a result, the application does not detect the input change properly, and the Product dropdown is not populated.
Many beginners try:
WebUI.setText(findTestObject('Vendor_Field'), 'ACME Corp')
WebUI.delay(3)
But the problem isn’t timing.
The problem is that the event which triggers Product loading never occurred, so waiting longer won’t change anything.
So solution can be many, I mean you need to try couple of options ( whichever works)
Solution 1: Simulate Enter or Tab
Many auto-complete controls load data only after the user confirms the selection.
WebUI.setText(findTestObject('Vendor_Field'), 'ACME Corp')
WebUI.sendKeys(findTestObject('Vendor_Field'), Keys.chord(Keys.ENTER))
I’ve seen this solve many dependent dropdown issues.
Solution 2: Use Click + Select Instead of setText
Sometimes the field isn’t a true textbox at all—it’s a searchable dropdown.
In that case:
WebUI.click(findTestObject('Vendor_Field'))
WebUI.setText(findTestObject('Vendor_Field'), 'ACME Corp')
WebUI.click(findTestObject('Vendor_ACME_Option'))
The actual selection event happens when clicking the option, not when typing.
Solution 3: Wait for the Product Dropdown to Populate
Instead of using fixed delays:
WebUI.waitForElementClickable(
findTestObject('Product_Dropdown'),
20
)
This makes the test more reliable.
Solution 4: Trigger JavaScript Change Event
If the application specifically relies on a change event:
WebUI.executeJavaScript(
"arguments[0].dispatchEvent(new Event('change', { bubbles: true }))",
Arrays.asList(WebUiCommonHelper.findWebElement(findTestObject('Vendor_Field'), 10))
)
This can help when the framework listens for change events.