I just realized something, and I am sorry for the inundation of emails

I realized that after the value is set, a postback is done (the site is in 
ASP.NET). Could the assertion of it being enabled be called again after the 
postback? And in that split second, the element might be disabled due to it 
not being there?

On Tuesday, August 21, 2012 2:16:06 PM UTC-4, enroxorz wrote:
>
>
> I got an idea from the waiting page from watirwebdriver.com, and I 
> implemented it, but the same error occurs. In fact, it happens after the 
> value is set then blows up. Is there anymore info you need?
>  
>
> Watir::Wait.until { @browser.select_list(:id => 
> "ctl00_cphWizard_Content_QuestionField0_QuestionDropDownList").enabled? }
>
> @browser.select_list(:id => 
> "ctl00_cphWizard_Content_QuestionField0_QuestionDropDownList").when_present(60).select(/#{value}/)
>
>
> On Tuesday, August 21, 2012 1:47:58 PM UTC-4, Al Snow wrote:
>>
>>  Three interesting references:
>>
>>    - 
>>    
>> http://stackoverflow.com/questions/9215713/watir-webdriver-clicking-javascript-button
>>    - http://watirwebdriver.com/waiting/
>>    - 
>>    http://rubydoc.info/gems/watir-webdriver/0.2.0/Watir/EventuallyPresent
>>
>>
>> Al
>>
>> ------------------------------
>> Date: Tue, 21 Aug 2012 10:20:07 -0700
>> From: [email protected]
>> To: [email protected]
>> Subject: Re: [wtr-general] Issue transitioning from 2.0.4 to 3.1.0
>>
>> Al,
>>
>> The step "passes". No error is thrown. I then tried to remove the 
>> when_present(60) portion, but the same error occurred. I also re-arranged 
>> the other steps so that the one in question is set to last and the error 
>> still happens. The most peculiar thing is that the drop down is set but 
>> then fails right afterwards.
>>
>> --Enrique
>>
>> On Tuesday, August 21, 2012 11:26:57 AM UTC-4, Al Snow wrote:
>>
>>  Enrique,
>>
>>         If you do just the first two parts: @browser.select_list(:id => 
>> "ctl00_cphWizard_Content_QuestionField0_QuestionDropDownList"), what happens?
>>
>> Al
>>
>> ------------------------------
>> Date: Tue, 21 Aug 2012 07:40:48 -0700
>> From: [email protected]
>> To: [email protected]
>> Subject: [wtr-general] Issue transitioning from 2.0.4 to 3.1.0
>>
>> I am currently transitioning our test servers from Watir 2.0.4 (Ruby 
>> 1.8.7) to Watir 3.1.0 and I have run into a curious issue.
>>
>> We are using cucumber to run our scripts, and at one point I get an error:
>>
>> object {:index=>0, :ole_object=>#<WIN32OLE:0x196d4c0>} is disabled 
>> (Watir::Exception::ObjectDisabledException)
>>
>>
>> In Watir 2.0.4 I do not receive this error at all, but in 3.1.0 I run the 
>> same script and the error comes up no matter what (I have put sleeps before 
>> it and after it).
>>
>> @browser.select_list(:id => 
>> "ctl00_cphWizard_Content_QuestionField0_QuestionDropDownList").when_present(60).select(/#{value}/)
>>
>> When I visibly inspect the browser, the select list changes to the value 
>> passed in, but right after it fails. The element is not disabled at any 
>> point of the page (even before and after a postback) so I am very confused 
>> when that same piece of code runs fine in 2.0.4 but not 3.1.0.
>>
>>
>> Any help would be greatly appreciated
>>
>>
>> --Enrique
>>
>>
>> -- 
>> 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]
>>  
>>
>> -- 
>> 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]
>>  
>

-- 
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]

Reply via email to