# XPath doesn't work correctly

**URL:** <https://discuss.appium.io/t/xpath-doesnt-work-correctly/1555>\
**Category:** Issues/Bugs\
**Created:** [November 19, 2014, 2:58pm UTC](https://discuss.appium.io/t/xpath-doesnt-work-correctly/1555 "2014-11-19T14:58:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kasheylm](https://discuss.appium.io/user_avatar/discuss.appium.io/kasheylm/32/113_2.png) [@kasheylm](https://discuss.appium.io/u/kasheylm)\
**Post date:** [November 19, 2014, 2:58pm UTC](https://discuss.appium.io/t/xpath-doesnt-work-correctly/1555/1 "2014-11-19T14:58:51Z")

</div>

Hi guys,

I’m using next environment:

appium server - 1.2.4.1 (windows appium.exe distributive)  
appium client - c# binding  
device - genymotion emulator, API 4.3  
appium instrumentation - selendroid  
app - android native

The problem is next - when I use in xpath expressions “contains” or “text()” it didn’t return elements but it should for sure.

For example i have element with text “Hello”.  
Next xpath returns 0 elements : `Driver.FindElementsByXPath("//*[contains(text(),'Hello')]");`

Have anyone faced a same problem?

P.S. : Does this have the same xpath locating behavier?  
Driver.FindElementsByXPath() and Driver.FindElements(By.XPath())

---

<div class="post-metadata">

**Author:** ![Chris\_Billante](https://discuss.appium.io/user_avatar/discuss.appium.io/chris_billante/32/5207_2.png) [@Chris\_Billante](https://discuss.appium.io/u/Chris_Billante)\
**Post date:** [November 19, 2014, 5:19pm UTC](https://discuss.appium.io/t/xpath-doesnt-work-correctly/1555/2 "2014-11-19T17:19:27Z")

</div>

See this. Already posted - [An unknown server-side error occurred while processing the](https://discuss.appium.io/t/an-unknown-server-side-error-occurred-while-processing-the/111/4). Might be related since they both use the find by text capability of xpath.
