title: Find xpath of input element based on entered text
body: <p>I have a page which appears with some pre-filled data in input boxes. I want to select the input box which has my desired content, based on the content itself. This content isn't part of page HTML, but rather appears as <code>value</code> attribute in the element properties.</p>
  <p>I have written a simple HTML file (test.html) to demonstrate the problem:</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt; Hello &lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div id=&quot;test&quot;&gt;
          &lt;input type=&quot;text&quot;&gt; &lt;br&gt; &lt;br&gt;
          &lt;input type=&quot;text&quot;&gt; &lt;br&gt; &lt;br&gt;
          &lt;input type=&quot;text&quot;&gt; &lt;br&gt; &lt;br&gt;
      &lt;/div&gt;
  
      &lt;script type=&quot;text/javascript&quot;&gt;
          let input_nodes = document.querySelectorAll(&quot;input&quot;)
          for(var i = 0; i &lt; input_nodes.length; i++) {
              input_nodes[i].value = 'value_' + i;
          }
      &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>On this page I want to select the element with entered value as <code>value_1</code>. It doesn't appear in page HTML, but can be seen in element properties.
  <a href="https://i.stack.imgur.com/G8Ptb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/G8Ptb.png" alt="enter image description here" /></a></p>