# Getting Xpath from uiautomator in windows for hybrid app when only class name is present in node details

**URL:** <https://discuss.appium.io/t/getting-xpath-from-uiautomator-in-windows-for-hybrid-app-when-only-class-name-is-present-in-node-details/4358>\
**Category:** Support\
**Created:** [May 16, 2015, 8:27pm UTC](https://discuss.appium.io/t/getting-xpath-from-uiautomator-in-windows-for-hybrid-app-when-only-class-name-is-present-in-node-details/4358 "2015-05-16T20:27:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sidd](https://discuss.appium.io/letter_avatar_proxy/v4/letter/s/ba8739/32.png) [@sidd](https://discuss.appium.io/u/sidd)\
**Post date:** [May 16, 2015, 8:27pm UTC](https://discuss.appium.io/t/getting-xpath-from-uiautomator-in-windows-for-hybrid-app-when-only-class-name-is-present-in-node-details/4358/1 "2015-05-16T20:27:20Z")

</div>

![](https://discuss.appium.io/uploads/default/988/48763868ca780d2e.png) Screen  
 ![](https://discuss.appium.io/uploads/default/989/8c4ea652a2c35871.png)  
Node details in uiautomatorviewer

I want to locate the Username edit textfield.

---

<div class="post-metadata">

**Author:** ![Anki](https://discuss.appium.io/letter_avatar_proxy/v4/letter/a/ecd19e/32.png) [@Anki](https://discuss.appium.io/u/Anki)\
**Post date:** [May 18, 2015, 11:04am UTC](https://discuss.appium.io/t/getting-xpath-from-uiautomator-in-windows-for-hybrid-app-when-only-class-name-is-present-in-node-details/4358/2 "2015-05-18T11:04:38Z")

</div>

1.Use index and class field together for creating xpath  
2.Instantiate object of UISelector class and use it to find xpath

Refer-[http://qxf2.com/blog/identify-ui-elements-mobile-apps/](http://qxf2.com/blog/identify-ui-elements-mobile-apps/)
