Skip to content

Instantly share code, notes, and snippets.

@rafaelugolini
rafaelugolini / select2_selenium.py
Last active March 1, 2017 17:07 — forked from benselme/select2_selenium.py
Class helper for Select2 controls with Selenium Webdriver
from selenium.webdriver import ActionChains
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
class Select2(object):
def __init__(self, element):
self.browser = element.parent
self.replaced_element = element
self.element = self.browser.find_element_by_id(