How Do I Click on Google Chrome Button?

Hi!

I´ve made macros with a lot of find image to get around within the website.

But whenever i change locations or screens the find image doesn´t work and I have to make new screenshots.

I think maybe I might be able to use html to get to the buttons. For example I´ve got a Save button i gotta press with click on found image

14

And here I see the save_and_continue button.
Any way I can press it with something KBM? I´ve tried but not seeing any solutions.

43

Thanks for any tips!

Based on your HTML screenshot, it looks like this is the button you want to click on:

<button type="submit" name="next_action" value="save_and_continue" class="btn btn-prinary" title="Next Action">Save</button>

You should be able to use an XPath to click the button:

image

The XPath is:
//button[@name='next_action']

If this does not work, you may need to adjust the XPath.

Ok so the save button works with a simple submit form, don´t know why I didn´t find that one before posting here. But I´m now looking at the Add button above the save button, and that one won´t jump for me.

When copying the xpath from the source it comes out like this:
//*[@id=“e58beb75e5eb9920637c2c5448965c12”]/div[1]/a[1]

Anything I can/should remove from it so it works in KBM? or is it supposed to look like this?

Thanks for all the patience and helpfulness!

Does that mean you tried it and it doesn't work?

If so, to be of any real help, I need to have the actual HTML code around that button.

The best way to get that (if you can't post the URL) is, using the Chrome Dev tools, select the parent element above the button, right-click, and select "Copy > Copy outerHTML". Then post that here in a code block with "html" as the language. If the code is too long, or is sensitive, you can put in a zip file, and post in a PM to me.

How to Put Code in a Forum Code Block

Just insert your code between the lines with the triple backquotes:

image

See Markdown for Code Blocks

To get syntax highlighting, then use the keyword in lower case for that language, like:
applescript
javascript
html

I cannot find the Add button, as you can see KBM finds the link.

Ok so Forum Code Block? I just did it manually.. I´m not really sure what you meant :sweat_smile:

<a href="javascript:;" class="btn btn-primary" data-action="add">Add <i class="fa fa-plus-circle" aria-hidden="true"></i></a>

OK, I'm confused by your statements. You say you can't find the Add button, but then you show some HTML. Please clarify.

IAC, I would need more HTML than just that one statement.
As I asked above:

It is very important to include the HTML code of the parent element, which will surround the Add button link.

Hi @JMichaelTX

I was so confused myself that I´ve postponed this to another day where hopefully I have acquired some more wisdom :wink:

Thanks so much for your patience and helpfulness

Isak

1 Like