title: Using Python + Selenium, how to find whether the page title contains a particular string?
body: <p>To assert the page title, I do not want to do a hard check but rather a soft one, something like a string pattern match on the page title. For this, here is an excerpt of my code which unfortunately is not working:</p>
  
  <pre><code>wait = WebDriverWait(self.driver, 15)
  wait.until(lambda driver:self.driver.title.lower().startswith('Checkout'))
  self.assertIn("Checkout", self.driver.title)
  </code></pre>
  
  <p>This is the exact title of the page: <strong>Checkout - HarXYZ</strong> </p>
  
  <p>Can someone please point out where I am making a mistake? Is there any other way of asserting the page title through string pattern match?</p>