# Selection methods (Xpath / Attributes xpath) for mobile

**URL:** <https://forum.katalon.com/t/selection-methods-xpath-attributes-xpath-for-mobile/50317>\
**Category:** Mobile Testing\
**Tags:** mobile-testing, katalon-studio\
**Created:** [December 16, 2020, 10:32am UTC](https://forum.katalon.com/t/selection-methods-xpath-attributes-xpath-for-mobile/50317 "2020-12-16T10:32:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![olivier](https://avatars.discourse-cdn.com/v4/letter/o/d2c977/32.png) [@olivier](https://forum.katalon.com/u/olivier)\
**Post date:** [December 16, 2020, 10:32am UTC](https://forum.katalon.com/t/selection-methods-xpath-attributes-xpath-for-mobile/50317/1 "2020-12-16T10:32:24Z")

</div>

Hello,

for mobile testing, In my Object Repository my xpath object is :  
//\*[@class=‘android.widget.TextView’ and @text=‘Nom’]//following::android.widget.EditText[1]

I have 2 solution to set my Xpath :

1. “Selection Method” = XPath
2. “Selection Method” = Attributes + check xpath in object’s properties

In my case only solution 2) is working, but why the 1) didn’t ?  
Thanks

---

<div class="post-metadata">

**Author:** ![duyluong](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/duyluong/32/1116_2.png) [@duyluong](https://forum.katalon.com/u/duyluong)\
**Post date:** [December 23, 2020, 8:11am UTC](https://forum.katalon.com/t/selection-methods-xpath-attributes-xpath-for-mobile/50317/2 "2020-12-23T08:11:04Z")

</div>

Hi @olivier,

Can you share the full console log here of the run with 2 different locators?
