
| Key: |
WTR-188
|
| Type: |
Bug
|
| Status: |
Open
|
| Priority: |
Major
|
| Assignee: |
Unassigned
|
| Reporter: |
Jeff Fry
|
| Votes: |
1
|
| Watchers: |
1
|
|
If you were logged in you would be able to see more operations.
|
|
|
Watir
Created: 11/Dec/07 07:43 PM
Updated: 06/Jan/08 01:27 PM
|
|
| Component/s: |
None
|
| Affects Version/s: |
1.5.2
|
| Fix Version/s: |
Future
|
|
|
Original Estimate:
|
Unknown
|
Remaining Estimate:
|
Unknown
|
Time Spent:
|
Unknown
|
|
Environment:
|
Windows XP, Internet Explorer 6 SP2
|
|
|
Reported by: Lauro Canonica
The FileField.set method fails if there are more than 1000 files in the folder containing the file:
This code fails:
$ie.file_field(:id, file).setPatched(fileName);
Watir sets the name in the filename field before the "Choose window" is ready.
The "Choose Window" will then wait forever.
Suggested quick fix:
Add a @autoit.Sleep(1000) before setting the file name field
Watir.rb line 4069:
system("rubyw -e \"require 'win32ole'; @autoit=WIN32OLE.new('AutoItX3.Control'); waitresult=@autoit.WinWait 'Choose file', '', 15; if waitresult == 1\" -e \"@autoit.Sleep(1000); @autoit.ControlSetText 'Choose file', '', 'Edit1', '#{setPath}'; @autoit.ControlSend 'Choose file', '', 'Button2', '{ENTER}';\" -e \"end\"")
|
|
Description
|
Reported by: Lauro Canonica
The FileField.set method fails if there are more than 1000 files in the folder containing the file:
This code fails:
$ie.file_field(:id, file).setPatched(fileName);
Watir sets the name in the filename field before the "Choose window" is ready.
The "Choose Window" will then wait forever.
Suggested quick fix:
Add a @autoit.Sleep(1000) before setting the file name field
Watir.rb line 4069:
system("rubyw -e \"require 'win32ole'; @autoit=WIN32OLE.new('AutoItX3.Control'); waitresult=@autoit.WinWait 'Choose file', '', 15; if waitresult == 1\" -e \"@autoit.Sleep(1000); @autoit.ControlSetText 'Choose file', '', 'Edit1', '#{setPath}'; @autoit.ControlSend 'Choose file', '', 'Button2', '{ENTER}';\" -e \"end\"") |
Show » |
|
I'm reluctant to commit the suggestion to trunk, since it only masks, rather than cures the problem. What we need is to find a way to sleep until we KNOW that the window is ready.