This has nothing to do with the performance enhancements, and aside from 
the bug where I didn't check for a regexp being fed to getElementById() 
(which I fixed) I haven't seen any signs of that performance fix being 
"unreliable".  All tests pass, including the ones I added to check for 
being able to use a regexp to match an :id, which weren't there or I 
would have caught the bug the first time.

The problem in this case is exactly what it says.  A DIV element in the 
DOM doesn't *have* a fireEvent OLE call.  (I just brought up IRB, 
attached to an IE window open to unittests/html/div.html, assigned the 
first DIV element to a variable and then had it show me all the valid 
OLE methods:

irb(main):001:0> require 'watir'
=> true
irb(main):002:0> include Watir
=> Object
irb(main):020:0> ie = IE.attach(:title, /Div/);nil
=> nil
irb(main):021:0> d = ie.div(:id, 'div1');nil
=> nil
irb(main):022:0> d.document.ole_methods
=> [setAttribute, getAttribute, removeAttribute,...

No fireEvent, as the error message below stated.

Željko, are you sure that the right click event was in the DIV and not in 
another element inside of the DIV?

David Schmidt



Bret Pettichord wrote:
> I believe that this is bug introduced by the recent performance 
> enhancement to Watir that needs to be backed out until it can be made 
> more reliable.
>
> Unrelated to the error message, there is on "rightclick" javascript 
> event. I read my JavaScript book on the topic and it said that the event 
> is "onClick" but that you have to set the button bits on the event. I'm 
> not sure exactly how this would be done.
>
> Bret
>
> Zeljko wrote:
>   
>> This is out of my league. Anybody familiar with this error message?
>>
>> Željko
>>
>>   
>>     
>>> ie.div(:id,
>>> "detailProposal0610760").fire_event("rightclick")
>>>
>>> It highligts it like it wants to do something but
>>> never acts as a right click. This is the message in
>>> the prompt that I get if that helps.
>>>
>>> C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2039:in
>>> `method_missing': fireEvent (WIN
>>> 32OLERuntimeError)
>>>     OLE error code:80070057 in htmlfile
>>>   Invalid argument.
>>>   HRESULT error code:0x80020009
>>> Exception occurred.       from
>>>  C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:203
>>> :in `fire_event'
>>>         from ../test/test2.rb:180
>>>     
>>>       
>> ---------------------------------------------------------------------
>> Posted via Jive Forums
>> http://forums.openqa.org/thread.jspa?threadID=4007&messageID=11218#11218
>> _______________________________________________
>> Wtr-general mailing list
>> Wtr-general@rubyforge.org
>> http://rubyforge.org/mailman/listinfo/wtr-general
>>   
>>     
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general@rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>   

_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to