Hi Thanks for the reply. Can you please give me some where I can find the details.
Actually I found this code on -->http://www.kohl.ca/blog/archives/ 000040.html Please guide me. Thanks Vikas On Mar 26, 12:07 pm, Angrez Singh <ang...@gmail.com> wrote: > ie.document is method of "watir" and not "OLE Object of IE". You need to > study more about IE ole object if you want to do that. > > - Angrez > > On Thu, Mar 26, 2009 at 12:07 PM, Vikas Tulashyam <vtulash...@gmail.com>wrote: > > > > > > > > > I have tried this code but it gives error for document function. as-- > > > LE.rb:7:in `method_missing': Document (WIN32OLERuntimeError) > > OLE error code:80004005 in <Unknown> > > <No Description> > > HRESULT error code:0x80020009 > > Exception occurred. from OLE.rb:7 > > >Exit code: 1 > > > On Mar 26, 11:35 am, Vikas Tulashyam <vtulash...@gmail.com> wrote: > > > Hi Guys, > > > I want to create a method by which I can perform any operation on a > > > object by just passing the identifier of that object. In Watir , we > > > need to call specific methods for calling a particular object as--> > > > > ie.text_filed(:id, 'Text1').set('Test') > > > > So, Can I impelment my method using win32OLE . e.g. --> > > > > require 'win32ole' > > > ie = WIN32OLE.new('InternetExplorer.Application') > > > ie.visible = true > > > ie.navigate("http://www.google.com") > > > ie.document.all["q"].value = "pickaxe" > > > ie.document.all["btnG"].click > > > > Is this a good way to create a function which performs an operation on > > > all object types by just passing identifier as --> > > > > def click(sObjectId) > > > > ie.document.all[sObjectId].click > > > > end > > > > Please reply. I will be thankful for your cooperation. > > > > Thanks > > > Vikas --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---