code: def dismiss(self):
          
          if self.driver.w3c:
              self.driver.execute(Command.W3C_DISMISS_ALERT)
          else:
              self.driver.execute(Command.DISMISS_ALERT)
docs: Dismisses the alert available.