In Ajax TruClient, how do you get the value of a selected item in a drop down list?
Question ID: 104797
0
0

I am using LR 11.5 TruClient with Firefox 8. I have randomly selected two items from two listboxes. The choices must be mutually exclusive. In order to verify the two selected items are not equal, I have added two object evaluate JavaScript steps to "Get Visible Text from Departure City listbox" and "Get Visible Text from Arrival City listbox". I also added a couple debugging messages,

window.alert("Departure City is:" + vDeparture_City);
window.alert("Arrival City is:" + vArrival_City);

My problem is this, instead of getting just the visible text, I get all the text from the listbox.

How do I get just the value that was selected in each listbox?

Marked as spam
Posted by (Questions: 1, Answers: 2)
Asked on January 9, 2013 7:45 pm
428 views
Answers (1)
0
Private answer

Per HP support

You can use an ''Evaluate JavaScript'' step to verify the value selected from the combo box.

var myText = object.value;
window.alert(myText);

Marked as spam
Posted by (Questions: 1, Answers: 2)
Answered on February 14, 2013 3:21 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top