title: Selenium. Xpath. Find element by array of words
body: <p>Currently I need to find elements, that have at least one or more words from some array.</p>
  
  <p>Here is the code that I have:</p>
  
  <pre><code>collect(['some', 'words'])-&gt;each(function ($word) {
      $found = $this-&gt;driver-&gt;findElements(
          WebDriverBy::xpath("//div[contains(text(), '$word')]")
      );
  });
  </code></pre>
  
  <p>Is is possible somehow to make it using one <code>findElements()</code> call and pass the array there? </p>