Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Highlighted
garecanbp Contributor.
Contributor.
551 views

Trigger Javascript 'onchange' at DOMListBox

How can I trigger Javascript 'onchange' event at DOMListBox?

From KB How can I trigger the JavaScript "OnChange" event when selecting a HtmlListBox item using SilkTest?, I should use the DoubleSelect() method but there is no DoubleSelect() method in my case.

Please suggest me a solution.

Thank you

0 Likes
2 Replies
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

RE: Trigger Javascript 'onchange' at DOMListBox

Hi.

Off the top of my head, I can remember some forms I manually fill using keyboard instead of mouse, where some events only trigger after I change the focus to a different control. Maybe you could try to set focus on your listbox, select a value and unset focus to reproduce that behaviour.
0 Likes
garecanbp Contributor.
Contributor.

RE: Trigger Javascript 'onchange' at DOMListBox

Hi, I've found the solution
1. I used 'Get the property' to get the property of the event & saved it to variable
2. From variable I trimmed it to get just the javascript
3. Using ListBox's Locator, I used method "Execute Javascript' from variable.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.