from selenium.common.exceptions import UnexpectedTagNameException from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.common.action_chains import ActionChains class Selectmenu(object): def __init__(self, webelement): if webelement.tag_name.lower() != "select": raise UnexpectedTagNameException( "Selectmenu only works on