title: how to select a row a matching a text with protractorjs
body: <p>we are using protractorjs and node for our test automation. as we have two web application one with customer facing which is ReactJS application which has very reactive elements on those we are using this framework. In the agent facing application we have a page which has normal html table. i was trying to match the text of my choice and double click on it to open a model box. i was able to find the number of rows on the table, but could not go to the exact row of my choice. could any one help me on this with any protractorjs functions.</p>
  
  <p>in this case i need to navigate to 'ETHBTC' and double-click on that to open its details in new pop-up model box.</p>
  
  <p>Page Element</p>
  
  <pre><code>&lt;table class="table"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Instrument ID&lt;/th&gt;
              &lt;th&gt;Symbol&lt;/th&gt;
              &lt;th&gt;Status&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;1&lt;/td&gt;
              &lt;td&gt;BTCUSD&lt;/td&gt;
              &lt;td&gt;Running&lt;/td&gt;
          &lt;tr&gt;
              &lt;td&gt;2&lt;/td&gt;
              &lt;td&gt;ETHBTC&lt;/td&gt;
              &lt;td&gt;Running&lt;/td&gt;
          &lt;tr&gt;
              &lt;td&gt;3&lt;/td&gt;
              &lt;td&gt;ETHGBP&lt;/td&gt;
              &lt;td&gt;Running&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>screen picture</p>
  
  <p><a href="https://i.stack.imgur.com/YfawL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YfawL.png" alt="enter image description here"></a></p>
  
  <p>code:
  after getting row count do not know how to traverse to required row and select that. i know we have to use for loop to traverse, but dono how to match the the expected one.</p>
  
  <pre><code>const service_table = element(by.css('.table'))
  let table_rows = service_table.element.all(by.tagName('tbody')).all(by.tagName('tr'))
  let rows_count = table_rows.count()
  </code></pre>
  
  <p><strong>UPDATED</strong></p>
  
  <p>here is my full mrthod for double clicking activity on the table row</p>
  
  <pre><code>  async open_exchange_service(data) {
      await browser.sleep(1000)
      const service_table = await element(by.css('.table'));
      const table_row = await service_table.element(by.cssContainingText('tbody tr td', data));
      try {
        console.log('i am in tryyyyyyyy loooppppp')
        await browser.actions().click(table_row).perform().then(() =&gt; browser.actions().click(table_row).perform());
        // await browser.actions().
        //   mouseMove(table_row).
        //   doubleClick().
        //   perform();
        // await browser.actions().
        //   mouseMove(table_row).
        //   doubleClick().
        //   perform();
      } catch (error) {
        console.log('i am in catchhhhhh looppppp')
        const service_table = await element(by.css('.table'));
        const table_row = await service_table.element(by.cssContainingText('tbody tr td', data));
        await browser.actions().click(table_row).perform().then(() =&gt; browser.actions().click(table_row).perform());
        // await browser.actions().
        //   mouseMove(table_row).
        //   doubleClick().
        //   perform();
        // await browser.actions().
        //   mouseMove(table_row).
        //   doubleClick().
        //   perform();
      }
    }
  
    async open_exchange_instrument(data) {
      await browser.sleep(1000)
      const service_table = await element(by.css('.table'));
      const table_row = await service_table.element(by.cssContainingText('tbody tr td', data));
      try {
        console.log('i am in tryyyyyyyy loooppppp')
        await browser.actions().click(table_row).perform().then(() =&gt; browser.actions().click(table_row).perform());
        // await browser.actions().doubleClick(table_row).perform();
        // await browser.actions().doubleClick(table_row).perform();
      } catch (error) {
        console.log('i am in catchhhhhh looppppp')
        await browser.sleep(500)
        const service_table = await element(by.css('.table'));
        const table_row = await service_table.element(by.cssContainingText('tbody tr td', data));
        await browser.executeScript('arguments[0].scrollIntoView(true);', table_row);
        await browser.actions().click(table_row).perform().then(() =&gt; browser.actions().click(table_row).perform());
        // await browser.actions().doubleClick(table_row).perform();
        // await browser.actions().doubleClick(table_row).perform();
      }
    }
  </code></pre>