def toggle_publish(self): item = Waiter.wait_by_xpath(self.driver, self.ITEM) hover = ActionChains(self.driver).move_to_element(item) hover.perform() Waiter.wait_by_xpath(self.driver, self.TOGGLE_PUBLISH).click()
def set_category(self): Waiter.wait_by_xpath(self.driver, self.selectCategory) Waiter.wait_clickable_by_xpath(self.driver, self.selectCategory).click() Waiter.wait_by_xpath(self.driver, self.catItem) element = Waiter.wait_clickable_by_xpath(self.driver, self.catItem) element.click()
def get_toggle_text(self): item = Waiter.wait_by_xpath(self.driver, self.ITEM) hover = ActionChains(self.driver).move_to_element(item) hover.perform() return Waiter.wait_by_xpath(self.driver, self.TOGGLE_PUBLISH).text
def check_toggle(self, text): item = Waiter.wait_by_xpath(self.driver, self.ITEM) hover = ActionChains(self.driver).move_to_element(item) hover.perform() Waiter.wait_by_xpath(self.driver, self.TOGGLE_PUBLISH + '[text()="' + text + '"]')
def delete(self): item = Waiter.wait_by_xpath(self.driver, self.ITEM) hover = ActionChains(self.driver).move_to_element(item) hover.perform() Waiter.wait_by_xpath(self.driver, self.BTN_DELETE).click() Waiter.wait_by_xpath(self.driver, self.MODAL_WINDOW) Waiter.wait_by_xpath(self.driver, self.BTN_APPROVE).click() Waiter.wait_by_xpath(self.driver, self.ITEM)
def set_title(self, title): Waiter.wait_by_xpath(self.driver, self.TITLE).clear() Waiter.wait_by_xpath(self.driver, self.TITLE).send_keys(title) Waiter.wait_by_xpath(self.driver, '//h1').click()
def check_toggle(self, text): Waiter.wait_by_xpath(self.driver, self.TOGGLE_PUBLISH + '[text()="' + text + '"]')
def get_toggle_text(self): return Waiter.wait_by_xpath(self.driver, self.TOGGLE_PUBLISH).text
def get_budget_error(self): return Waiter.wait_by_xpath(self.driver, self.BUDGET_ERROR).text
def set_city(self): Waiter.wait_by_xpath(self.driver, self.selectCity) Waiter.wait_clickable_by_xpath(self.driver, self.selectCity).click() element = Waiter.wait_clickable_by_xpath(self.driver, self.cityItem) element.click()
def set_country(self): Waiter.wait_by_xpath(self.driver, self.selectCountry) self.driver.find_element_by_xpath(self.selectCountry).click() Waiter.wait_by_xpath(self.driver, self.catItem) element = Waiter.wait_clickable_by_xpath(self.driver, self.countryItem) element.click()
def set_spec(self): Waiter.wait_by_xpath(self.driver, self.selectSpec) Waiter.wait_clickable_by_xpath(self.driver, self.selectSpec).click() element = Waiter.wait_clickable_by_xpath(self.driver, self.specItem) element.click()
def set_description(self, description): Waiter.wait_by_xpath(self.driver, self.DESCRIPTION).send_keys(description) Waiter.wait_by_xpath(self.driver, '//h1').click()
def open_form(self): Waiter.wait_by_xpath(self.driver, self.CREATE_BTN).click()
def get_form_tags(self): return Waiter.wait_by_xpath( self.driver, self.HIDDEN_TAG_INPUT).get_attribute("value")
def get_job_title(self, title): return Waiter.wait_by_xpath(self.driver, self.TITLE + '[text()="' + title + '"]').text
def get_title_error(self): return Waiter.wait_by_xpath(self.driver, self.TITLE_ERROR).text
def toggle_publish(self): Waiter.wait_by_xpath(self.driver, self.TOGGLE_PUBLISH).click()
def get_header(self, text): return Waiter.wait_by_xpath( self.driver, self.HEADER_TEXT + '[text()="' + text + '"]').text
def open_edit_form(self): Waiter.wait_by_xpath(self.driver, self.EDIT).click()
def set_type(self): Waiter.wait_by_xpath(self.driver, self.TYPE_RADIO).click()