title: Selenium find element by class name two parameters
body: <p>How do I find elements by class name without repeating the output? I have two class to scrape <code>hdrlnk</code> and <code>results-price</code>. I wrote the code like this: </p>
  
  <pre><code>x = driver.find_elements_by_class_name(['hdrlnk','result-price'])
  </code></pre>
  
  <p>and it gives me some error. I have another code that I tried and here it is:</p>
  
  <pre><code>x = driver.find_elements_by_class_name('hdrlnk'),
  y = driver.find_elements_by_class_name('result-price')
  for xs in x:
      for ys in y:
          print(xs.text + ys.text)   
  </code></pre>
  
  <p>But I got the result like this</p>
  
  <pre><code>sony 5 disc cd changer$40
  sony 5 disc cd changer$70
  sony 5 disc cd changer$70
  sony 5 disc cd changer$190
  sony 5 disc cd changer$190
  sony 5 disc cd changer$190
  sony 5 disc cd changer$190
  sony 5 disc cd changer$10
  </code></pre>
  
  <p>The part of the HTML structure that I am trying to scrape</p>
  
  <pre><code>&lt;p class="result-info"&gt;
      &lt;span class="icon icon-star" role="button" title="save this post in your favorites list"&gt;
          &lt;span class="screen-reader-text"&gt;favorite this post&lt;/span&gt;
      &lt;/span&gt;
      &lt;time class="result-date" datetime="2019-11-07 18:20" title="Thu 07 Nov 06:20:56 PM"&gt;Nov  7&lt;/time&gt;
      &lt;a href="https://vancouver.craigslist.org/rch/ele/d/chandeliers/7015824686.html" data-id="7015824686" class="result-title hdrlnk"&gt;CHANDELIERS&lt;/a&gt;
      &lt;span class="result-meta"&gt;
          &lt;span class="result-price"&gt;$800&lt;/span&gt;
          &lt;span class="result-hood"&gt; (Richmond)&lt;/span&gt;
          &lt;span class="result-tags"&gt;
              &lt;span class="pictag"&gt;pic&lt;/span&gt;
          &lt;/span&gt;
          &lt;span class="banish icon icon-trash" role="button"&gt;
              &lt;span class="screen-reader-text"&gt;hide this posting&lt;/span&gt;
          &lt;/span&gt;
          &lt;span class="unbanish icon icon-trash red" role="button" aria-hidden="true"&gt;&lt;/span&gt;
          &lt;a href="#" class="restore-link"&gt;
              &lt;span class="restore-narrow-text"&gt;restore&lt;/span&gt;
              &lt;span class="restore-wide-text"&gt;restore this posting&lt;/span&gt;
          &lt;/a&gt;
      &lt;/span&gt;
  &lt;/p&gt;
  </code></pre>
  
  <p>The first element is repeated but I got the correct value for the second one. How do I correct this error?</p>