Is it possible that your select(/#{value}/) matches more than one option
element?
The code works currently like this:
1. finds the select element
2. checks if it is disabled - it is not disabled in your case seeing from
the stacktrace
3. finds all option elements, which match the value
4. one-by-one checks if option is not disabled and selects it
It might be, that you will find more than one option elements and when
first gets selected then others are disabled (even for some very short
period) and then it blows up. Could it be the case?
Check if more than one option is found like this:
puts @browser.select_list(:id =>
"ctl00_cphWizard_Content_QuestionField0_QuestionDropDownList").options(:value
=> /#{value}/).size
Jarmo Pertman
-----
IT does really matter - http://itreallymatters.net
On Wednesday, August 22, 2012 3:46:10 PM UTC+3, enroxorz wrote:
>
> The site is written in ASP.NET, so it's a bit out of my knowledge to be
> honest BUT I did find a work around that somehow doesnt blow up
>
> @browser.select_list(:id =>
> "ctl00_cphWizard_Content_QuestionField0_QuestionDropDownList").when_present(60).select(/#{value}/)
>
> rescue nil
>
> The value is still set AND it doesnt blow up. I am sorry I couldnt get an
> exact error in case it needs to be patched, but at least there is a work
> around for anyone who needs it.
>
> Thanks guys for all the help!
>
> On Wednesday, August 22, 2012 3:08:07 AM UTC-4, Željko Filipin wrote:
>>
>> On Tue, Aug 21, 2012 at 9:53 PM, enroxorz <[email protected]> wrote:
>> > Is there anything else I can give you that might help?
>>
>> Link to the page, if it is public. Or link to the page that has the same
>> problem.
>>
>> Željko
>> --
>> filipin.eu
>>
>
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]