Hi, lanok and all In order to test on this method, I have appended this html code on Web page
<Object id=flexapp, onClick = "javascript:alert('This is an alert box');"> click me <br> And then, i execute the watir code ie.object(:id, 'flexApp').click, the stdout throw an exception like this, D:\watirlib\watirlib\lib\pwatir\lib/watir/element.rb:56:in `assert_exists': Unable to locate element, using :id, "flexApp" (Watir::Exception::UnknownObjectException) from D:\watirlib\watirlib\lib\pwatir\lib/watir/element.rb:288:in `enabled?' from D:\watirlib\watirlib\lib\pwatir\lib/watir/element.rb:60:in `assert_enabled' from D:\watirlib\watirlib\lib\pwatir\lib/watir/element.rb:233:in `click!' from D:\watirlib\watirlib\lib\pwatir\lib/watir/element.rb:219:in `click' from D:/watirlib/watirlib/lib/main.rb:58 Still have another modification for watir api? 2008/10/28 LanOK <[EMAIL PROTECTED]> > > I think it's useful to know, how to define a new element. > In following example I define an element with tag-name <OBJECT> > thank you LFIdnl for idea > > module Watir > def object(how, what) > return Object.new(self, how, what) > end > def objects > return Objects.new(self) > end > class Object < NonControlElement > TAG = 'OBJECT' > end > class Objects < ElementCollections > include CommonCollection > def element_class; Object; end > def element_tag; 'OBJECT'; end > end > end > > > --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---