# How-to click javascript button - and debug noob questions

**URL:** <https://www.ruby-forum.com/t/how-to-click-javascript-button-and-debug-noob-questions/159274>\
**Category:** Rails\
**Created:** [February 2, 2009, 11:26pm UTC](https://www.ruby-forum.com/t/how-to-click-javascript-button-and-debug-noob-questions/159274 "2009-02-02T23:26:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dginther](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/3e96dc/32.png) [@dginther](https://www.ruby-forum.com/u/dginther)\
**Post date:** [February 2, 2009, 11:26pm UTC](https://www.ruby-forum.com/t/how-to-click-javascript-button-and-debug-noob-questions/159274/1 "2009-02-02T23:26:06Z")

</div>

Source:  
 ![]()

Contains a href to a javascript function, has an image as a clickable  
element.  
I’m trying to trigger the click by an image reference:  
ie.button(:src, /start-my-page/).click

but I exit and get a “1” return code.  
Questions:

1. What is the correct means to click this image?
2. Is there a way to get a more meaningful error than simply a return  
code of 1?
