title: Improve selenium code's speed
body: <p>I'm using Selenium in python to test a data table (not really a html table, combined by multiple divs)</p>
  
  <p>That's what my table looks like:</p>
  
  <pre><code>&lt;div class="products"&gt;
      &lt;div class="product"&gt;
          &lt;span class="original-price"&gt;20$&lt;/span&gt;
          &lt;span class="discounted-price"&gt;10$&lt;/span&gt;            
      &lt;/div&gt;
  
      &lt;div class="product"&gt;
          &lt;span class="price"&gt;20$&lt;/span&gt;
      &lt;/div&gt;
  
      ...
  &lt;/div&gt;
  </code></pre>
  
  <p>There are multiple products, some has discounted price.</p>
  
  <p>This is my script:</p>
  
  <pre><code>products = self.driver.find_elements_by_css_selector('.products &gt; div')
  for product in products:
      found_price = True
      try:
          original_price = product.find_element_by_css_selector('.original-price').text
          reduced_price = product.find_element_by_css_selector('.discounted-price').text
      except NoSuchElementException:
          try:
              original_price = product.find_element_by_css_selector('.price').text
              reduced_price = original_price
          except NoSuchElementException:
              found_price = False
  
      if found_price: check_price(original_price, reduced_price)
  </code></pre>
  
  <p>But my script runs very slowly. It sends a lot of request "remote_connection" each time the "find_element_by_css_selector" called like this one:</p>
  
  <pre><code>2018-02-27 13:48:08 [selenium.webdriver.remote.remote_connection] DEBUG: POST http://127.0.0.1:62147/session/14902b71a0f812fa74f81524f0eb1386/elements {"using": "css selector", "sessionId": "14902b71a0f812fa74f81524f0eb1386", "value": ".products &gt; div .original-price"}
  2018-02-27 13:48:08 [selenium.webdriver.remote.remote_connection] DEBUG: Finished Request
  </code></pre>
  
  <p>Any ideas to improve its performance ?</p>
  
  <p>Thanks !</p>