title: How to locate elements in protractor using custom html tags?
body: <p>I have the following HTML  for the rows in the table.</p>
  <pre><code>&lt;tr [attr.row-index]=&quot;i&quot; data-test=&quot;value-row&quot; mat-row *matRowDef=&quot;let row; columns: objectKeys(displayedColumns); index as i&quot;&gt;&lt;/tr&gt;
  </code></pre>
  <p>To get the row in protractor testing, I am using the following xpath.</p>
  <pre><code>const rowElem = element(by.xpath('//table//tbody//tr[@row-index=&quot;0&quot;]'));
  </code></pre>
  <p>This is working as jQuery in the web tools console for Chrome, however, in the test, I am getting the following error.</p>
  <pre><code>NoSuchElementError: No element found using locator: By(xpath, //vv-data-table//tbody//tr[@row-index=&quot;0&quot;])
  </code></pre>
  <p>I am doubtful that the row-index is causing the issue, because if I use an xpath without the <code>row-index</code> tag, as given below, then it works fine.</p>
  <pre><code>const rowElem = element(by.xpath('//table//tbody//tr[1]'));
  </code></pre>
  <p>I am really not able to understand why this is happening and I am new to protractor testing. Any clue or idea would be very much appreciated, thanks in advance.</p>