Using Rubygems and Watir
I’m unable to select options from a second drop down.
here is the code of the 2 drop downs
<select class="LocalUtility" name="Accounts[0][Local_Utility]" id="">
<select class="LocalUtility" name="Accounts[1][Local_Utility]" id="">
I’m able to select options from the 1st by using
browser.select_list(:class, 'LocalUtility').set ('value')
I tried to use index for the 2nd drop down (tried with 1,2)
browser.select_list(:index, 1).set ('value')
And I cannot use the name because Ruby is throwing errors due to what I’m suspecting is that Ruby does not like the brackets [1][Local_Utility]
browser.select_list(:name 'Accounts[1][Local_Utility]').set ('value')
Is there a possible solution to this?
Try
to set the value in the second select list.
I’m surprised that the name doesn’t work though. There’s a potential typo in what you’ve supplied us with
Try