# Clicking on two identical buttons in the same screen

**URL:** <https://forum.katalon.com/t/clicking-on-two-identical-buttons-in-the-same-screen/39098>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [January 27, 2020, 1:42pm UTC](https://forum.katalon.com/t/clicking-on-two-identical-buttons-in-the-same-screen/39098 "2020-01-27T13:42:49Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [January 27, 2020, 2:03pm UTC](https://forum.katalon.com/t/clicking-on-two-identical-buttons-in-the-same-screen/39098/2 "2020-01-27T14:03:39Z")

</div>

> [@](#):
>
> Everything worked fine until I got to a word with two identical letters (for example, “green”). Then It’s only clicking the first “e”, and not the other (it’s trying to click again on the first “e”)

Actually, it didn’t work fine. Your algorithm didn’t cover the problem domain.

> [@](#):
>
> even if I create two separate test objects and even if I separate their folders

That’s because your choice of algorithm is fixed, it can’t “dynamically adapt” to the change in your head, and the code (and browser) really don’t care where you store these things in Katalon.

> [@i-melingo](#):
>
> I tried to verify that the element is clickable before clicking it (because each button is disabled after use)  
> …  
> But then I get an error in the “verify element clickable” stage stating that the element is NOT clickable (cause it’s still referring to the previous one).

That’s right, because it’s the same algorithm which you’ve already proved is faulty.

> [@i-melingo](#):
>
> Does anybody knows how to make Katalon click two buttons one after the other, even if they are defined the same?

Yes, we do. You made a good job of showing us the _results_ of your trials but you didn’t show us the definitions of your Test Objects. Do they use CSS? XPath? How do the buttons fit into the structure of the HTML document in the page?

If you read this post, you’ll get some good advice about how to report errors:

> [@\[TIP\] How To Help Us Help You!](http://forum.katalon.com/t/tip-how-to-help-us-help-you-my-test-is-broken-nothing-works-updated-nov-2019/12919):
>
> My test is BROKEN! NOTHING WORKS! HELP ME! Relax. We get it. We really do. There are some pretty smart and clever people on this forum, but you must realize, they are not magicians or wizards or gods. They cannot see your code, they can’t see your errors and they don’t even know what your AUT is meant to do even though it might seem perfectly obvious to you. So please relax and follow the advice below, before you start writing your post. The advice below will tell you the exact information …

---

_[View the full topic](https://forum.katalon.com/t/clicking-on-two-identical-buttons-in-the-same-screen/39098)._
