How to Click in a Named Button .

I have built a partial macro for Chrome with the great help of a couple members here. Thanks guys. To finish the macro the easiest part is turning out to be the most difficult. I need an action to click/activate a specific button, but I just can’t get it to do it.

The code for the button is below. I have tried every variation, and I trust I am missing something, thus needing your help.

<div class="form_right">
<input name="submit"  type="submit"  value="Create New Paste"  id="submit"  accesskey="s"  class="button1 btnbig">
 . . . 

Any assistance will be greatly appreciated.

Thank you.

If the button has (or can be assigned a keyboard shortcut, that is the easiest.

If the button is always in the same location on the page, then you can instruct a click at a given mouse position (center of that button)
For example (Move and Click at 121, 355) from the Top Left Corner of the Front Window

If the button moves around the window in different contexts, then this can be addressed by taking a “picture” of the button.

Then Move and Click at (0,0) from the Center of the Found Image. You might have to play with the “blur” setting.

Thank you for the advice, but I have tried all that and operation is intermittent at best. If I could only find what part of the posted code would work, that would solve all my problems.

Since the HTML button has an id, that’s the easiest to use:

var btnElem = document.getElementById('submit');;

If it has an ID, then it has a trivial XPath, and that can be used in the click action.

Thanks all for your replies. I have switched to Chrome since there Actions for it. Especially “Submit Google Chrome Form”. And the great thing with Chrome there in the “Inspect” tool of being able to mouse over the area and it auto highlights the code. AND in copy there is an option to “Copy XPath”. Still messing with and getting errors. Will have to dink with it further.