-
Notifications
You must be signed in to change notification settings - Fork 76
Element#click_no_wait does not click elements in a frame #45
Comments
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: #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: 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: 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. |
Is this one the same as #49? |
Yes, fixed by #49. |
I have a problem where the same click_no_wait is working in my local machine but not in server environment and that too with 2 or more IE instance. With single instance of IE, click_no_wait is working in server environments without any issue. Any help? |
I've written a blog post about debugging |
Thanks Jarmo, I've narrowed down my problem a bit with your help. Now I have ended up with the below issue: I noticed that the hwnd seems to be correct (maps to the intended IE instance). This issue happens when I have two IE browsers open. Even Browser.attach :title, /title/ only works with single IE browser window but not with two. It would be helpful if I get some hints to debug this issue. |
My problem is resolved. I found that the Operating System couldn't view/access the second browser window instance and this has been resolved by turning off User Account Control settings to low. |
When trying to set a file field that is located within a frame, the "Choose File to Upload" dialog never opens, causing the script to timeout.
This issue does not occur if the file field is not within a frame.
Steps to Reproduce - Using w3schools:
--> Notice that the "Choose File to Upload" dialog never opens and that the following exception occurs.
Steps to Reproduce - Locally:
--> Notice that the RAutomation::UnknownWindowException mentioned above occurs.
Environment:
The text was updated successfully, but these errors were encountered: