I am having a problem with clicking the image that is a link for a file
download.
In my code I start a separate thread to handle File Save dialog (using its
own WinClicker object) and it works OK, but the problem is that the main
thread blocks forever in the image click call and I never see text "After
call"
(see code below)
It seems that image click from below is execute nicely because fiel save
dialog is triggered (and handled),
but as the IE page was not changed, my IE object blocks forever in the click
handler.
Sending Ctrl+C to the console reveals that it sleeps in waitForIE in click
handler.
Does anyone know how to handle this properly in non-blocking mode?
(BTW, I am using Watir 1.31 because Watir 1.41 exe installer is broken and
the Watir 1.4 zip installer breaks with "C:/Program
Files/Watir/install.rb:16: uninitialized constant Fox")
TIA,
Miroslav
CODE:
--------------------------------------------
# click nth image with given src (src, idx) where idx starts from 1
len = ie.images.length()
counter = 0
for x in 1..len do
if ie.images[x].src == src
counter = counter + 1
if counter == idx
ie.images[x].click
puts "--------- After click"
end
end
end
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general