WATIR - Clicking img

This is driving me up the wall.

I need to click on an apply button, however the Javascript has a number
of hidden buttons. You would think the developer would identify each one
uniquely but he hasn’t. Each one is:

the only difference is the onClick bit.

Any ideas as to how I can click this damn button?

I’ve tried numerous things so any help would be appreciated.

Thanks
Tracy

I’m not sure if this a great way of doing it, but I overrode the link
method
to add the :html search type:

class IE
def getLink( how, what )
[… normal code …]
when :html
links.each do |thisLink|
if what.matches(thisLink.outerHtml)
link = thisLink if link == nil
end
end
[… rest of method …]
This searches based on outer html. This could be used to find your link
based on contents in the onClick:

@ie.link(:html, /value=‘New’/).flash

/Shawn

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs