示例#1
0
    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()
示例#2
0
 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()
示例#3
0
    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
示例#4
0
    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 + '"]')
示例#5
0
    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)
示例#6
0
 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()
示例#7
0
 def check_toggle(self, text):
     Waiter.wait_by_xpath(self.driver,
                          self.TOGGLE_PUBLISH + '[text()="' + text + '"]')
示例#8
0
 def get_toggle_text(self):
     return Waiter.wait_by_xpath(self.driver, self.TOGGLE_PUBLISH).text
示例#9
0
 def get_budget_error(self):
     return Waiter.wait_by_xpath(self.driver, self.BUDGET_ERROR).text
示例#10
0
 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()
示例#11
0
 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()
示例#12
0
 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()
示例#13
0
 def set_description(self, description):
     Waiter.wait_by_xpath(self.driver,
                          self.DESCRIPTION).send_keys(description)
     Waiter.wait_by_xpath(self.driver, '//h1').click()
示例#14
0
 def open_form(self):
     Waiter.wait_by_xpath(self.driver, self.CREATE_BTN).click()
示例#15
0
 def get_form_tags(self):
     return Waiter.wait_by_xpath(
         self.driver, self.HIDDEN_TAG_INPUT).get_attribute("value")
示例#16
0
 def get_job_title(self, title):
     return Waiter.wait_by_xpath(self.driver, self.TITLE + '[text()="' +
                                 title + '"]').text
示例#17
0
 def get_title_error(self):
     return Waiter.wait_by_xpath(self.driver, self.TITLE_ERROR).text
示例#18
0
 def toggle_publish(self):
     Waiter.wait_by_xpath(self.driver, self.TOGGLE_PUBLISH).click()
示例#19
0
 def get_header(self, text):
     return Waiter.wait_by_xpath(
         self.driver, self.HEADER_TEXT + '[text()="' + text + '"]').text
示例#20
0
 def open_edit_form(self):
     Waiter.wait_by_xpath(self.driver, self.EDIT).click()
示例#21
0
 def set_type(self):
     Waiter.wait_by_xpath(self.driver, self.TYPE_RADIO).click()