History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: WET-72
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Alister Scott
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
WET

File Object Intermittently Not Working

Created: 25/Jul/06 07:27 PM   Updated: 18/Jun/07 05:00 PM
Component/s: WET DOM Interface
Affects Version/s: 0.8.0
Fix Version/s: 1.4

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment:
Win XP SP2
Build 132


 Description  « Hide
When running a script that includes attaching a file to , about 1 times out of 5, the script crashes for no reason.
The select file dialog is displayed with no file selected.
The output code is:

DEBUG: evaluating Browser("title:=/^Create Note:.*/").File("label:=File:")
uninitialized constant Wet::Winobjects::Window::ObjectNotFoundException
C:/Program Files/ruby/lib/ruby/gems/1.8/gems/wet-winobj-0.1-mswin32/./wet/winobj
ects/Window.rb:159:in `assert_object_exists'C:/Program Files/ruby/lib/ruby/gems/
1.8/gems/wet-winobj-0.1-mswin32/./wet/winobjects/Window.rb:99:in `text'C:/Progra
m Files/ruby/lib/ruby/gems/1.8/gems/wet-winobj-0.1-mswin32/./wet/winobjects/WinD
ialog.rb:105:in `to_s'C:/Program Files/ruby/lib/ruby/gems/1.8/gems/wet-web-0.9.1
.132-mswin32/./qantom/winobjects/WebFileChooser.rb:46:in `puts'C:/Program Files/
ruby/lib/ruby/gems/1.8/gems/wet-web-0.9.1.132-mswin32/./qantom/winobjects/WebFil
eChooser.rb:46:in `initialize'C:/Program Files/ruby/lib/ruby/gems/1.8/gems/wet-w
eb-0.9.1.132-mswin32/./qantom/webobjects/WebFile.rb:42:in `new'C:/Program Files/
ruby/lib/ruby/gems/1.8/gems/wet-web-0.9.1.132-mswin32/./qantom/webobjects/WebFil

 All   Comments   Work Log   Change History      Sort Order:
Alister Scott - 24/May/07 12:52 AM
This does not seem to be happening with WET 0.98 onwards.
This looks like a WET 0.8.0 problem only.

Alister Scott - 07/Jun/07 10:48 PM
I think I spoke too soon.
This seems be happening with WET0.9.8 also.
The problem appears to be in WebFile.rb under
C:\RUBY\lib\ruby\gems\1.8\gems\wet-web-0.9.1.404-mswin32\qantom\webobjects

The problem appears between line 41 and 42.

self.click_without_blocking
WebFileChooser.new(@container.window_handle()).set_file(path)

If I put a sleep(2) between line 41 and 42 the problem appears to go away, but this slows down my scripts....
Any suggestions on how to resolve this?

Raghu Venkataramana - 18/Jun/07 10:36 AM
Looking at Alister's comment that a sleep is solving the issue, it looks like a click_without_blocking issue. Unfortunately, the click_without_blocking happens in a totally different process and there is no control that the current process has over it . At a later date, I am thinking of replacing the outofprocess methods using the rpc server

Alister Scott - 18/Jun/07 05:00 PM
I have been experimenting and even a sleep(0.5) is enough to solve this problem.
It still is a sleep, but this works so I am happy with this solution.
You can close this issue if you would like.