Home Features Article

Click by Attribute

Posted on 2022-04-16 Updated on 2022-10-30

How to send clicks to any page by using Click by Atrribute feature?

Applied on: Link Clicks Generator (Clicks BOT).

To know more about the benefits of using Clicks BOT application, click this link


Clicks BOT app has three feature to send clicks to any page:

  1. Click on Page: Clicks once randomly on the page.
  2. Random Clicks: Clicks randomly (x) times on (x) links into the page.
  3. Click by Attribute: Send clicks to unlimited items or elements (Button, Image, Link ...etc.) based on its attribute.


To send one or more clicks to any element, define its value then click on Start Job button.

If you’re already familiar with the browser console, you don’t need to read this article. If not, let’s get started!

How to know the attrbute value in order to use [Click by Attribute] feature?



Add the page link, tick "By attribute" option and select the attribute you want from the drop list, for example: CSS Selector


Open your browser, and navigate to the link.

Right click on the element (Button, Image, Link ... etc.) you need the bot to clicks on. In the example below: I want to send click to "Help me to choose" button
1- Right click on the button
2- Choose: Inspect



The browser will open the console and indicates to the button properties

Right click on its properties and copy the attribute you want to deal with. in this example it is: CSS Selector


Back to the application and paste the value into the Text area then click on Test button


The report will show the result of clicking the selected element based on the selected attribute: Correct or Error

  • Correct: the element is clickable with the selected attribute.
  • Error: the bot is unable to click on this element with this attribute.

In this case, you may try to choose another attribute (By ID, XPath, Text …etc.) or read the error reason that has been generated by the report, sometimes it could guide you to the correct way based on the element attribute.

More customization:

You can send unlimited clicks, as much as you want to the same page in the same session with more automated options.

Double click on the attribute value then add new attributes, you can also set the time before clicking each one


In this example, the bot will do the following:

  • Navigates to the page and waitaing for the page load completed.
  • Waiting for 3 seconds, clicks on the element1 (defined by Class Name) then waiting for the page load completed.
  • Waiting for 6 seconds, clicks on the element2 (defined by CSS Selector) then waiting for the page load completed.
  • Waiting for 1 second, clicks on the element3 (defined by XPath) then waiting for the page load completed.
  • Stays on the last page for (x) seconds according to the "Stay for" value you've determined in the settings.

Note:

  1. In this example we have worked with Chrome browser, it's almost the same for all other browsers (Edge, Firefox ...etc.)
  2. Remember that some attribute values could be used many times in the same page for more than element, for example:
    Your page could contain many buttons with different title like (Read more, Know more, contact us…) but all are using the same class name, e.g. “btn-secondary”. In this case, it’s not useful to use [Class Name] attribute.
    Also, it could has many elements with the same text like “Read more” but each one directs to a different link, for this reason we encourage you to use [XPath or CSS Selector] because it returns a unique value for each element.
  3. Unless you changed your website design or structure, you don’t need to get the attribute value for each time you want to send clicks. When you ensure that the attribute value is correct. you can save the whole project (Project >> Save) or even save this value somewhere on your computer.

Why you have to understand the nature of this feature before you buy the application?

We’re always happy to support and answer your questions, but you probably noticed that we’re unable to support, answer your question or guide you how to use it or extract an attribute code.

You can imagine how many websites are there, how many pages each website has, and how many elements each page contains? Billions of billions of possibilities for each element attribute. It all depends on the way you have developed your website with, and you're the only one who knows that.

According to the nature of this feature, you need to have a basic knowledge in HTML and/or JavaScript coding languages and also you're familiar with the browser console. If you don’t have this knowledge, you probably can’t use it.

However, it’s really easy to learn some concepts about the browser console. We hope that this article helped you to understand this feature, if not, search on Google or YouTube for something like “find XPath or CSS selector in chrome console” or “how to use chrome console” also read these two articles on Chrome Dev and Stackoverflow


Found this article helpful?

[ 10 Out of 10 Found Helpful ]

Still no luck? we can help!

Submit a ticket and we’ll get back to you as soon as possible.