Highlighted
Absent Member.
Absent Member.
2247 views

How to select an item from a dropdown box with TruClient?

Jump to solution

With Loadrunner 12.50 / TrueClient I am trying to select a simple entry from a dropdown box, but it is not working. The dropdown box looks as follows

 

When clicking on the down arrow the dropdown opens and I see the possibilities:

Spoiler

I want to select the item "Dokumenten-Austausch" so it looks like follows:

 

I have proceeded this way during the recording, but during the playback the link "Wann verwende ich welche Kategorie?" placed directly below the dropdown is selected! This is not what I want!

The currect step looks like follows:

 

Any idea how to fix this behavior in the step settings?

0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.
Absent Member.

Re: How to select an item from a dropdown box with TruClient?

Jump to solution

Hi,

If I understood correctly, you get a different record/replay behavior when selecting an item from the listbox.
I did not quite understood what is the difference, but still can suggest few workarounds for it.
1) Try to use alternative recorded step

2) Use evaluate java script step on object to select the item using DOM actions
a) Drag evaluate js on object step from the toolbox
b) Select the listbox as the test object step
c) In the code argument section write JavaScript code that selects the item  (Something like: object.selectedIndex = 2;)

Best Regards,

Michal

View solution in original post

0 Likes
1 Reply
Highlighted
Absent Member.
Absent Member.

Re: How to select an item from a dropdown box with TruClient?

Jump to solution

Hi,

If I understood correctly, you get a different record/replay behavior when selecting an item from the listbox.
I did not quite understood what is the difference, but still can suggest few workarounds for it.
1) Try to use alternative recorded step

2) Use evaluate java script step on object to select the item using DOM actions
a) Drag evaluate js on object step from the toolbox
b) Select the listbox as the test object step
c) In the code argument section write JavaScript code that selects the item  (Something like: object.selectedIndex = 2;)

Best Regards,

Michal

View solution in original post

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.