title: How to take the values from the variable and enter in the text box?
body: <p><em>titles – is a string variable that contains the string values</em></p>
  <pre><code>List&lt;String&gt; titles = new WebDriverWait(driver, 20).until(ExpectedConditions.visibilityOfAllElementsLocatedBy(By.xpath(&quot;//div[@class='document-card__details']//h3/a&quot;))).stream().map(element-&gt;element.getAttribute(&quot;innerHTML&quot;)).collect(Collectors.toList());
  System.out.print(&quot;THE NAME ARE &quot; + titles);
  </code></pre>
  <p><em>below is the x-path of a search box</em></p>
  <pre><code>driver.findElement(By.xpath(&quot;//div[@class='text-filter__input']//input[@placeholder='Search Title']&quot;));
  </code></pre>
  <p>The action I want to perform – To take the random values from the titles[variable] and enter that in the search box.</p>
  <p>Is there any way to do it?</p>