Hi there.

I just wanted to share something I found when looking at IE8

OS: WinXP
Ruby: 1.8.6
Watir 1.6.2
Browser: IE8 RC1


Problem:
When trying to set a file_field, the browser would open the dialog, but would 
not actually choose the file.
It would appear that the browser would "hang" and none of the tests would 
progress.

One Solution:
I patched the following line (438) in input_elements.rb on my system.

Changed
system("rubyw -e \"require 'win32ole'; 
@autoit=WIN32OLE.new('AutoItX3.Control'); waitresu...@autoit.winwait 'Choose 
file', '', 15; sleep 1; if waitresult == 1\" -e \"@autoit.ControlSetText 
'Choose file', '', 'Edit1', '#{setPath}'; @autoit.ControlSend 'Choose file', 
'', 'Button2', '{ENTER}';\" -e \"end\"")

to

system("rubyw -e \"require 'win32ole'; 
@autoit=WIN32OLE.new('AutoItX3.Control'); waitresu...@autoit.winwait 'Choose', 
'', 15; sleep 1; if waitresult == 1\" -e \"@autoit.ControlSetText 'Choose', '', 
'Edit1', '#{setPath}'; @autoit.ControlSend 'Choose', '', 'Button2', 
'{ENTER}';\" -e \"end\"")


What happened:
It looks like with IE8, they changed the title of the dialog that handles the 
file upload from "Choose file" to "Choose File to Upload".
By changing the title to match on to be just "Choose", the function should 
still work for IE7 (and IE6?) as well.


________________________________
Alan Ark | QA Manager| ComplĂ­ | ar...@compli.com<mailto:ar...@compli.com> | 
office: 503.294.2020 x106 | fax: 503.294.1200 | 
www.compli.com<http://www.compli.com/>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to