title: Xpath for element on Android mobile app
body: <p>I am struggling to write <code>Xpath</code> of an element present in Android mobile app -</p>
  
  <p>Below is xml:</p>
  
  <pre><code>&lt;node index="5" text="" resource-id="com.mcdonalds.app:id/grid_item" class="android.widget.RelativeLayout" package="com.mcdonalds.app" content-desc="" checkable="false" checked="false" clickable="true" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[366,601][714,949]"&gt;
                          &lt;node index="0" text="Buy one Big Mac, get one FREE&amp;#13;" resource-id="com.mcdonalds.app:id/name" class="android.widget.TextView" package="com.mcdonalds.app" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[378,841][702,907]" /&gt;
                          &lt;node index="1" text="Expires 12/31/15" resource-id="com.mcdonalds.app:id/expiration" class="android.widget.TextView" package="com.mcdonalds.app" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[378,907][702,937]" /&gt;
                      &lt;/node&gt;
  </code></pre>
  
  <p>I am trying to click the element which has property <code>text="Buy one Big Mac, get one FREE&amp;#13;"</code></p>
  
  <p>The xpath I have tried are -</p>
  
  <pre><code>driver.findElementByXPath("//android.widget.TextView[@text='Buy one Big Mac, get one FREE&amp;#13;']").click();
  </code></pre>
  
  <p>AND</p>
  
  <pre><code>driver.findElementByXPath("//android.widget.TextView[@text=\"Buy one Big Mac, get one FREE&amp;#13;\"]").click();
  </code></pre>
  
  <p>Both of the methods do not work. Does anyone had similar issue?</p>
  
  <p>There is no other unique property of the element.</p>