This appears to be a general issue with using the Element#click_no_wait method
for an element within a frame. The same problem can be seen when clicking a
button in a frame (using click_no_wait).
The no_wait command that is being generated is:
```ruby
#no_wait command:
ruby -e "$:.unshift('C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.3.0/lib
/watir-classic/win32ole/1.9.3').unshift('C:/Ruby193/lib/ruby/gems/1.9.1/gems/s4t
-utils-1.0.4/lib').unshift('C:/Ruby193/lib/ruby/gems/1.9.1/gems/user-choices-1.1
.6.1/lib').unshift('C:/Ruby193/lib/ruby/gems/1.9.1/gems/subexec-0.0.4/lib').unsh
ift('C:/Ruby193/lib/ruby/gems/1.9.1/gems/mini_magick-3.2.1/lib').unshift('C:/Rub
y193/lib/ruby/gems/1.9.1/gems/win32screenshot-1.0.7/lib').unshift('C:/Ruby193/li
b/ruby/gems/1.9.1/gems/watir-classic-3.3.0/lib').unshift('C:/Ruby193/lib/ruby/ge
ms/1.9.1/gems/xml-simple-1.1.2/lib').unshift('C:/Ruby193/lib/ruby/gems/1.9.1/gem
s/rautomation-0.7.3/lib').unshift('C:/Ruby193/lib/ruby/gems/1.9.1/gems/win32-pro
cess-0.7.0/lib').unshift('C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.2.0-x86-ming
w32/lib').unshift('C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.2.0-x86-mingw32/ext
/ffi_c').unshift('C:/Ruby193/lib/ruby/gems/1.9.1/gems/multi_json-1.3.7/lib').uns
hift('C:/Ruby193/lib/ruby/site_ruby/1.9.1').unshift('C:/Ruby193/lib/ruby/site_ru
by/1.9.1/i386-msvcrt').unshift('C:/Ruby193/lib/ruby/site_ruby').unshift('C:/Ruby
193/lib/ruby/vendor_ruby/1.9.1').unshift('C:/Ruby193/lib/ruby/vendor_ruby/1.9.1/
i386-msvcrt').unshift('C:/Ruby193/lib/ruby/vendor_ruby').unshift('C:/Ruby193/lib
/ruby/1.9.1').unshift('C:/Ruby193/lib/ruby/1.9.1/i386-mingw32');require 'C:/Ruby
193/lib/ruby/gems/1.9.1/gems/watir-classic-3.3.0/lib/watir-classic/core';Watir::
FileField.new(Watir::IE.attach(:hwnd, 262508).frame({:tag_name=>['frame', 'ifram
e']}), :tag_name => Array.new << 'file', :unique_number => 1).click!();"
```
With the command failing at the:
```ruby
frame({:tag_name=>['frame', 'iframe']})
```
This part of the command is generated by the Frame#attach_command. The problem
appears to be fixed by changing the method to:
```ruby
def attach_command
tag_name = @specifiers[:tag_name].join("' << '")
@container.page_container.attach_command + ".frame(:tag_name => Array.new <<
'#{tag_name}', :unique_number => #{unique_number})"
end
```
Which is the way Element#generate_ruby_code is building the element's locator.
I will try to submit a patch tomorrow.
---
Reply to this email directly or view it on GitHub:
https://github.com/watir/watir-classic/issues/45#issuecomment-11474912
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development