title: Selenium By.XPATH - what to import?
body: <p>New <code>Selenium</code> has no old metods like <code>.find_element_by_xpath()</code> but it introduced new fabrique method  <code>.find_element(By.XPATH, searched_string)</code>. Here is the example from <a href="https://www.selenium.dev/documentation/webdriver/elements/finders/#first-matching-element" rel="nofollow noreferrer">docs</a>:</p>
  <pre><code>vegetable = driver.find_element(By.CLASS_NAME, &quot;tomatoes&quot;)
  </code></pre>
  <p>But it does not work, bc '<strong>By</strong>' is not defined.  I can't find the example what to import to use this pattern. In Java it is:</p>
  <pre><code>import org.openqa.selenium.By;
  </code></pre>
  <p>And what to do in Python?</p>