Пример #1
0
 def choose_last_month(self):
     helper.wait_element_visible(self.driver,*OrderLocator.date_range)
     date = self.driver.find_element(*OrderLocator.date_range)
     date.click()
     helper.wait_element_visible(
         self.driver, *OrderLocator.date_lastmonth_Link)
     choose_date = self.driver.find_element(
         *OrderLocator.date_lastmonth_Link)
     choose_date.click()
     helper.wait_element_visible(self.driver, *OrderLocator.channel_Select)
     helper.wait_seconds(1)
Пример #2
0
    def test_chargeId_testmode(self):
        ch_id = GetCharge.GetCharge_Refunded(1)
        self.home_page.search_charge(ch_id)
        self.home_page.search_charge_button()

        order_page = OrderPage(self.driver)
        detail_actual_amount, detail_refunded, detail_refund_history = order_page.detail_paid_refunded()
        order_page.close_detail()
        detail_actual_amount = detail_actual_amount[1:]
        detail_refund_amount = detail_refunded[1:]
        assert float(detail_actual_amount) >= 0
        assert float(detail_refund_amount) > 0
        while detail_refund_history.find(u'加载中') >= 0:
            helper.wait_seconds(1)
        assert detail_refund_history[1:] <= detail_refund_amount
Пример #3
0
    def detail_paid_no_refund(self):
        helper.wait_element_visible(self.driver, *OrderLocator.detail_frame)
        helper.wait_element_visible(self.driver,*OrderLocator.norefund_history)
        detail_refund_history = self.driver.find_element(
            *OrderLocator.norefund_history).text

        while detail_refund_history.find(u'加载中') >= 0:
            print "still waiting"
            helper.wait_seconds(1)
            detail_refund_history = self.driver.find_element(
                *OrderLocator.norefund_history).text

        helper.wait_element_visible(self.driver,*OrderLocator.detail_actual_amount)
        detail_actual_amount = self.driver.find_element(
            *OrderLocator.detail_actual_amount)
        return detail_actual_amount.text, detail_refund_history
Пример #4
0
    def verify_refund100_status(self):
        helper.save_screen_shot(self.driver,"before_verify_refund100_status")
        helper.wait_element(
        self.driver, *OrderLocator.batch_opeation_Dropdown)
        helper.wait_element_visible(
        self.driver, *OrderLocator.batch_opeation_Dropdown)
        batch_opeation = self.driver.find_element(
            *OrderLocator.batch_opeation_Dropdown)
        batch_opeation.click()

        helper.wait_element(self.driver, *OrderLocator.batch_refund_Option)
        helper.wait_element_visible(self.driver, *OrderLocator.batch_refund_Option)
        batch_refund = self.driver.find_element(*OrderLocator.batch_refund_Option)
        batch_refund.click()

        # wait seconds, for refund status not update so quickly.
        helper.wait_seconds(2)

        helper.wait_element(self.driver,*OrderLocator.view_history_tab)
        helper.wait_element_visible(self.driver,*OrderLocator.view_history_tab)
        history_tab= self.driver.find_element(*OrderLocator.view_history_tab)
        history_tab.click()

        # verify batch refund number
        helper.save_screen_shot(self.driver,"verify_refund_status_goto_history")
        helper.wait_element(self.driver,*OrderLocator.refund_history_count)
        helper.wait_element_visible(self.driver,*OrderLocator.refund_history_count)
        batch_history_count = self.driver.find_element(*OrderLocator.refund_history_count)
        logging.info("batch refund count: "+batch_history_count.text)
        print batch_history_count.text
        assert batch_history_count.text == '100'

        # verify batch refund amount
        helper.wait_element_visible(self.driver,*OrderLocator.refund_history_amount)
        batch_history_amount = self.driver.find_element(*OrderLocator.refund_history_amount)
        logging.info("batch refund amount: "+ batch_history_amount.text)
        print batch_history_amount
        assert batch_history_amount.text == '9.95'

        helper.save_screen_shot(self.driver,"verify_refund_status_history")