How to automate multiple button clicks

Learn more about automating multiple clicks within your Axiom.ai automation. There are multiple methods of performing these actions.

# The Click multiple elements step


To automate multiple button clicks, use the Step Finder to add the Click multiple elements step. This would allow for buttons to be clicked within a list.

  1. Click "Select" to open the Selector Tool to select the elements you wish to click.
  2. Set the click action to "Left click" or "Right click".
  3. Set the "Maximum clicks".

This does not allow you to click a button in a list, perform actions and then click the next item in the list.

# CSS selectors and the Loop though data step


The Loop through data step can be used to loop through a list of custom CSS selectors. We would recommend a structure like the one below:

  1. Create a list of CSS selectors within the Google Sheet.
  2. Add a Read data from a Google Sheet step, configure it to read the list of CSS selectors.
  3. Add a Loop through data step, configure this to use the [google-sheet-data] token output from the previous step.
  4. Inside the "Loop through data" step, add a Click element step.
  5. Configure the "Click element" step to use the CSS selector: click "Select", then "Custom", then "Set selector from data" and select the [google-sheet-data] token.
  6. Click "Complete".

A sample of a Google Sheet with a list of custom selectors:

A
1 .button1
2 .button2
3 .button3
4 .button4
5 .button5

# The Jump to another step step


To automate the clicking of a single button multiple times, use the Jump to another step step or the Conditionally jump to another step step.

  1. Add a Click element step, configure using the Selector Tool.
  2. Add a Jump to another step step or a Conditionally jump to another step step, configure this to jump back to the "Click element" step to repeat the click.
  3. Set the "Maximum cycles" or configure the condition used to perform the jump.

# Using Javascript


Use the Write JavaScript step to write a JavaScript script to automate the clicking of the button. There are various methods that can be used to automate the clicking of a button:

See our JavaScript snippets for some helpful starting points.