def is_element_visible(driver, selector, by=By.CSS_SELECTOR):
try:<EOL><INDENT>element = driver.find_element(by=by, value=selector)<EOL>return element.is_displayed()<EOL><DEDENT>except Exception:<EOL><INDENT>return False<EOL><DEDENT>
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)