# Handle Element have the same attribute (class, text,...) except Xpath

**URL:** <https://forum.katalon.com/t/handle-element-have-the-same-attribute-class-text-except-xpath/38469>\
**Category:** Mobile Testing\
**Tags:** mobile-testing, katalon-studio\
**Created:** [January 10, 2020, 3:15am UTC](https://forum.katalon.com/t/handle-element-have-the-same-attribute-class-text-except-xpath/38469 "2020-01-10T03:15:11Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Chris\_Trevarthen](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/chris_trevarthen/32/358_2.png) [@Chris\_Trevarthen](https://forum.katalon.com/u/Chris_Trevarthen)\
**Post date:** [January 25, 2020, 3:01am UTC](https://forum.katalon.com/t/handle-element-have-the-same-attribute-class-text-except-xpath/38469/2 "2020-01-25T03:01:50Z")

</div>

Hi @ducanhnguyeniuh,

Can you share what the properties of your object look like in the Object Repository as well as your test code?

This thread deals with objects that have similar xpaths and may be helpful:

> [@Two Objects have same Xpath?](http://forum.katalon.com/t/two-objects-have-same-xpath/8713/20):
>
> Katalon can select only the second. This is how it worked for me: (//\*[@class = 'ng-star-inserted' and @title = 'ERASE'])[last()] Note: this is not the DevTools but I wrote this as a xpath selector in the Object Repository. The braces () are around the xpath and the [last()] part is added later. Try this, please.

Hope this helps,

Chris

---

_[View the full topic](https://forum.katalon.com/t/handle-element-have-the-same-attribute-class-text-except-xpath/38469)._
