Forum Discussion

xuanphuoc2411's avatar
xuanphuoc2411
Occasional Contributor
7 years ago

Testcomplete return "JavaScript runtime error." when using dispatchEvent to firevent on chrome

Hi all,


We use "set property value" and fire event "onchange" to select item in combobox. However, Test complete returned runtime error when "onchange" process take a lot of time (about 10s). As my observation, the item on combobox is selected, and "onchange" process will finish after Test complete returned "Runtime error" in several seconds.

Please help me determine this issue?

 

aqObject.SetPropertyValue(controlAlias, "selectedIndex", selectItemIndex);
let elementEvent = controlAlias.ownerDocument.createEvent("HTMLEvents");          
elementEvent.initEvent("change", true, true);
controlAlias.dispatchEvent(elementEvent);

No RepliesBe the first to reply