From: Heesob Park Date: 2009-09-01T21:57:52+09:00 Subject: Re: Activate radio button (win32ole) Hi, 2009/9/1 Df Gh : > Hi there folks! > I am trying to automate a browser task with win32ole. The browser is > Internet Explorer. > > I used this tutorial: > http://rubyonwindows.blogspot.com/2007/05/automating-internet-explorer-with-ruby_20.html > > So the code for clicking a normal button goes like > > require 'win32ole' > ie = WIN32OLE.new('InternetExplorer.Application') > ie.Document.All.btnG.click > > where 'bntG' is the name of the button. > > The HTML for my radio button looks like this: > > > The problem is the name="type", I think. > When I do this 'ie.Document.All.type' ooops, didn't want to know it's > type... > > Any way around this? > I'd rather not use fat libraries like watir. You can use getElementsByName like this: ie.Document.getElementsByName('type').item(0).click Regards, Park Heesob