def __init__(self, driver) : self.driver = driver self.wait = WebDriverWait(self.driver, 40, 0.25) self.local_storage = LocalStorage(self.driver) self.login_button = (By.XPATH, '(//div[@id="firebaseui-auth-container"]//li)[2]/button') self.email_field = (By.XPATH, '//input[@name="email"]') self.password_field = (By.XPATH, '//input[@name="password"]') self.submit_button = (By.XPATH, '//button[@type="submit"]')
def set_logged_in_before(driver): local_storage = LocalStorage(driver) local_storage.set('sitekit:tour:%s' % HOST, 1)
def set_local_storage(self, stored_items): local_storage = LocalStorage(self.driver) for key, value in stored_items.items(): local_storage.set(key, value)
def get_local_storage(self): local_storage = LocalStorage(self.driver) self.stored_items = local_storage.items() return self.stored_items