So, I've been struggling with getting IE to consistently work when the 
window is not focused and I'm downloading a file.  I dream of the day where 
this can be handled like Chrome or Firefox.  It lead me to think about how 
I could use alert for this purpose.

I can get the text from the alert and dismiss it.  However I can't seem to 
click the save button.

b.alert.text
"Do you want to open or save this file?"

irb(main):027:0> b.alert.ok
=> nil

If I try to send an 's' which is the keyboard shortcut to save the file I 
get the below error.
b.alert.set("s")

Selenium::WebDriver::Error::ElementNotVisibleError: Modal dialog did not 
have a text box - maybe it was an alert

Interestingly enough, on the 'Save as' window I can set the file name and 
then send an :enter to save the file where I need it to go.

Anyone gone down this road and found it workable?

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