title: How to find element in html when the id is dynamic? My aim is to find element and select "option" under it
body: <p>HTML:</p>
  
  <pre><code>&lt;select id="XYZ_SV_12345" class="clsSelectControl pv" multiple="" size="11" aria-multiselectable="true" aria-invalid="false" style="width: auto;"&gt;
  </code></pre>
  
  <p>Here the id is dynamic but first few characters are always same i.e:"XYZ_SV_" is constant and remaining numeric values are dynamic.</p>
  
  <p>I tried find element using below methods but no luck.kindly help me to find the element.</p>
  
  <pre><code>driver.find_element_by_xpath("//*[contains(@id, 'XYZ_SV_']")
  driver.find_element_by_css_selector('input[id*="XYZ_SV_"]')
  driver.find_element_by_css_selector(".clsSelectControl.pv")
  </code></pre>