0

I want to click button without name using a spynner. The button looks like this:

<li> <a onclick="save(); return false;" href="">
<img src="/pathtoimage" width="31" height="13" alt="Save Changes"img  border="0"></a>
</li>
</ul>

Have you any idea? Please write some code. Any help is much appreciated!

Trufa
  • 39,971
  • 43
  • 126
  • 190
Simon
  • 3
  • 4

2 Answers2

1

You can call any javascript that is in the page by using(in your case):

br = spynner.Browser() br.runjs("save();")

You have access to all the javascript that is accessible to the page.

hackawaye
  • 11
  • 1
0

you could (2 years ago...) refer to this "button" as an image with a unique attributes.

in your example i'd use something like:

browser.click('img[alt="Save Changes"]')
Berry Tsakala
  • 15,313
  • 12
  • 57
  • 80