title: How do I click a button only when the web element is present?
body: <p>I need to code my script such that it only clicks onto the web element when it is available/present as it may not be on the web portal every time. I wish to click it if it exists and do nothing if it does not.</p>
  
  <p>I have only managed to code out such that the script will click the web element. However, when the web element is not present, the script will meet an error and stop running.</p>
  
  <pre><code>driver.find_element_by_id("smb_server").click()
  alert=driver.switch_to_alert()
  alert.accept()
  </code></pre>
  
  <p>I need to code a way such that it will only click the web element when it is present </p>