|
I had a similar problem, a set of dropdowns whose values are determined
by whatever is previously selected in the preceding dropdown. Mine happened
to be in a new window that was popped up but the principle is the same. What
I needed to do was look at the ‘View Source’ for the page and
determine what the potential values were for a given selection, and then code
my example accordingly. E.g. For dropdown A, if I select A1 then the possible options fro
dropdown B are B1, B2, B3, etc. And if B2 is selected from dropdown B
then the possible values for dropdown C are C4, C5, C7, etc. and so on. Here is the code I used... cw = IE.attach(:title, /PER Causal Code Management/i) cw.selectBox(:index, 1).select(/A1/) cw.selectBox(:index, 3).select(/B1/) cw.selectBox(:index, 12).select(/C01/) cw.button(:caption,"Add Causal
Codes").click cw.button("Close Window").click A matrix for this would be pretty ugly for more than 3 dropdown with
many values each, but it might save some time in the long run to do it. It would look something like this:
Hope this helps answer your question. --Mark -----Original Message----- Hi, Is there a way to select items in the select
list based on their position? one way is: ie.select_list(:name,"NAME").select_value(/2/) Since the items in the select list are added dynamically based on the
selection in the previous Select list, its value is not known
priorly.So I am not able to do that way.. I want to write a test case such that in the first iteration,
first item in the list is selected, in the second iteration second item is
selected and so on. Thanks in advance, Amitha.. _______________________________________________ Wtr-general mailing list http://rubyforge.org/mailman/listinfo/wtr-general | |||||||||||||||||||||||||||||||||||
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
