Upgrading Ruby and Watir with the latest versions (Ruby 1.9.3 and Watir-Classic
3.4.0) and IE from 7 to 8 but, after some simple refactoring I found an issue
that I cannot solve. With the previous versions of Ruby and Watir the same code
worked fine. The problem is related to modal dialog when I try to access to it,
the error is:
NoMethodError: undefined method `connect_unknown' for WIN32OLE:Class
C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.4.0/lib/watir-classic/modal_dialog.rb:59:in
`locate'
>From IRB, the same commands still continuos to work fine.
In detail, the Ruby code write a number in the textbox
id="ctl00_NetWor_txtNumber" and onchange event open a modal dialog. Executing
manually the statements at lines 1), 4), 5) form IRB I dont' have errors.
Executing Ruby I get error at line 4)
This is the relevant HTML
<input name="ctl00$NetWor$txtNumber" class="100" id="ctl00_NetWor_txtNumber"
style="text-transform: uppercase;" onmouseover="GetTooltip(this, true)"
onkeypress="if (WebForm_TextBoxKeyHandler(event) == false) return
false;NumericValue()" onfocus="className='100_focus'" onblur="className='100'"
onchange="openDecour();setTimeout('__doPostBack(\'ctl00$NetWor$txtNumber\',\'\')',
0)" onbeforedeactivate="if (typeof(Valid) !== 'undefined') Valid();"
type="text" _events="[object Object]" profile="class:txt_i_number"
AllowFloat="false"/>
This is the relevant Ruby
1) @ie.text_field(:id,'ctl00_NetWorCPH_txtNumber').set_no_wait(aNumber)
2) sleep $user_waiting_time
3) Watir::IE.attach_timeout = $timeOut
4) @ie.wait_until($wating_until_time) {@ie.modal_dialog.exist? and
@ie.modal_dialog.button(:id,'btnConfirm').exist? }
5) @ie.modal_dialog.button(:id,'btnConfirm').click
---
Reply to this email directly or view it on GitHub:
https://github.com/watir/watir-classic/issues/51
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development