code: def is_element_visible(driver, selector, by=By.CSS_SELECTOR):
      
      try:
          element = driver.find_element(by=by, value=selector)
          return element.is_displayed()
      except Exception:
          return False
docs: Returns whether the specified element selector is visible on the page.
      @Params
      driver - the webdriver object (required)
      selector - the locator that is used (required)
      by - the method to search for the locator (Default: By.CSS_SELECTOR)
      @Returns
      Boolean (is element visible)