Hi This would work:
require "watir" browser = Watir::Browser.start("http://www.cleartrip.com/") browser.radio(:id => "rnd_trip").set # set round trip radio button browser.image(:src => /calendar_icon.gif/).click # click the first calendar browser.image(:src => /calendar_icon.gif/, :index => 2).click # click the second calendar Zelkjko, i just removed all path of images etc, and used regular expression in here, it would click..... Regards Pallavi On Wed, Aug 4, 2010 at 4:15 PM, Željko Filipin < zeljko.fili...@wa-research.ch> wrote: > On Wed, Aug 4, 2010 at 12:42 PM, madhu kumar <madhu....@gmail.com> wrote: > > browser.image(:src => "/images/global/calendar_icon.gif").click, i am > getting error as Watir::Exception::UnknownObjectException: unable to locate > element, using :src => "/images/global/calendar_icon. and its showing error > as assert_exit and enabled. > > Well, image is not on the page, as error said. Are you sure you are at the > right page? > > > Željko > > -- > Before posting, please read http://watir.com/support. In short: search > before you ask, be nice. > > You received this message because you are subscribed to > http://groups.google.com/group/watir-general > To post: watir-general@googlegroups.com > To unsubscribe: > watir-general+unsubscr...@googlegroups.com<watir-general%2bunsubscr...@googlegroups.com> > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com