Example #1
0
 def select_all_channel(self):
     helper.wait_element_visible(self.driver,*OrderLocator.channel_Select)
     channel_select = self.driver.find_element(*OrderLocator.channel_Select)
     channel_select.click()
     all_channel_select = self.driver.find_element(
         *OrderLocator.channel_all)
     all_channel_select.click()
Example #2
0
 def download_orderid_template(self):
     helper.wait_element_visible(self.driver,*OrderLocator.charge_download_link)
     order_link = self.driver.find_element(*OrderLocator.charge_download_link)
     # order_link.click()
     url = datagen.get_current_dashboard_url()+"/page/download/batch_refund_by_order_id"
     path = helper.current_path()
     helper.downloadRemoteFile(url,path+"/chargeid.csv")
Example #3
0
 def click_refund_Button(self):
     helper.save_screen_shot(self.driver,"click_refund_Button_before")
     helper.wait_element(self.driver, *OrderLocator.refund_Button)
     helper.wait_element_visible(self.driver, *OrderLocator.refund_Button)
     refund_button = self.driver.find_element(*OrderLocator.refund_Button)
     refund_button.click()
     time.sleep(1)
Example #4
0
 def get_paid_refunded(self):
     helper.wait_element_visible(
         self.driver, *OrderLocator.amount_first_row)
     amount = self.driver.find_element(*OrderLocator.amount_first_row)
     paid = self.driver.find_element(*OrderLocator.paid_first_row)
     refunded = self.driver.find_element(*OrderLocator.refunded_first_row)
     return amount.text, paid.text, refunded.text
Example #5
0
 def click_next_step(self):
     helper.wait_element_visible(
         self.driver, *OrderLocator.next_step_Button)
     next_step_button = self.driver.find_element(
         *OrderLocator.next_step_Button)
     next_step_button.click()
     helper.save_screen_shot(self.driver,"batch_refund_click_next_step")
Example #6
0
 def get_red_id(self):
     helper.wait_element(
         self.driver, *OrderLocator.redId_first_row)
     helper.wait_element_visible(
         self.driver, *OrderLocator.redId_first_row)
     redId = self.driver.find_element(*OrderLocator.redId_first_row)
     return redId
Example #7
0
 def click_search(self):
     helper.save_screen_shot(self.driver, "click_search_before_search")  # 不要去掉,否则不稳定
     helper.wait_element(self.driver, *DebugLocator.webhook_search_Button)
     helper.wait_element_visible(self.driver, *DebugLocator.webhook_search_Button)
     search_webhook = self.driver.find_element(*DebugLocator.webhook_search_Button)
     helper.save_screen_shot(self.driver, "click_search_before_search")  # 不要去掉,否则不稳定
     search_webhook.click()
Example #8
0
 def input_refund_comment(self):
     # input refund comment
     helper.wait_element_visible(
         self.driver, *OrderLocator.refund_remark_Textarea)
     comment = self.driver.find_element(*OrderLocator.refund_remark_Textarea)
     comment.click()
     comment.send_keys("test batch refund by automation")
Example #9
0
 def Get_result(self):
     helper.save_screen_shot(self.driver, "Get_result")
     helper.wait_element_visible(self.driver, *DebugLocator.webhook_event)
     helper.wait_element(self.driver, *DebugLocator.webhook_result)
     helper.wait_element_visible(self.driver, *DebugLocator.webhook_result)
     result = self.driver.find_element(*DebugLocator.webhook_result)
     return result.text
Example #10
0
    def filter_argu_handled(self):
        helper.wait_element(self.driver,*OrderLocator.filter_panel_Button)
        helper.wait_element_visible(self.driver,*OrderLocator.filter_panel_Button)
        filter_panel = self.driver.find_element(*OrderLocator.filter_panel_Button)
        filter_panel.click()

        helper.wait_element(self.driver,*OrderLocator.filter_pay_all)
        helper.wait_element_visible(self.driver,*OrderLocator.filter_pay_all)
        filter_paid = self.driver.find_element(*OrderLocator.filter_pay_all)
        filter_paid.click()

        helper.wait_element_visible(self.driver,*OrderLocator.filter_refund_all)
        filter_refunded = self.driver.find_element(*OrderLocator.filter_refund_all)
        filter_refunded.click()


        helper.wait_element(self.driver,*OrderLocator.filter_argu_handled)
        helper.wait_element_visible(self.driver,*OrderLocator.filter_argu_handled)
        filter_paid = self.driver.find_element(*OrderLocator.filter_argu_handled)
        filter_paid.click()
        helper.save_screen_shot(self.driver,"filter_argu_handled_for_redenvelope")

        helper.wait_element_visible(self.driver,*OrderLocator.filter_apply_Button)
        filter_apply = self.driver.find_element(*OrderLocator.filter_apply_Button)
        filter_apply.click()
Example #11
0
 def input_current_datename(self):
     app_name_date = get_current_date()
     helper.wait_element_invisible(self.driver,*AppInfoLocator.popup)
     helper.wait_element_visible(self.driver, *AppInfoLocator.app_display_name)
     app_name = self.driver.find_element(*AppInfoLocator.app_display_name)
     app_name.clear()
     app_name.send_keys(app_name_date)
Example #12
0
 def close_detail(self):
     helper.save_screen_shot(self.driver,"close_detail")
     helper.wait_element(self.driver,*OrderLocator.close_detail_Button)
     helper.wait_element_visible(self.driver,*OrderLocator.close_detail_Button)
     detail_button = self.driver.find_element(
         *OrderLocator.close_detail_Button)
     detail_button.click()
     helper.wait_element_invisible(self.driver,*OrderLocator.close_detail_Button)
Example #13
0
 def sleect_paid(self):
     helper.wait_element_visible(self.driver,*OrderLocator.paid_Status_Select)
     paid_select = self.driver.find_element(
         *OrderLocator.paid_Status_Select)
     paid_select.click()
     helper.wait_element_visible(self.driver,*OrderLocator.paid_select)
     paid_select = self.driver.find_element(*OrderLocator.paid_select)
     paid_select.click()
Example #14
0
 def select_wx_channel(self):
     helper.wait_element_visible(self.driver,*OrderLocator.channel_Select)
     channel_select = self.driver.find_element(*OrderLocator.channel_Select)
     channel_select.click()
     time.sleep(1)
     helper.wait_element_visible(self.driver,*OrderLocator.channel_wx)
     wx = self.driver.find_element(*OrderLocator.channel_wx)
     wx.click()
Example #15
0
 def create_batchPay(self):
     helper.wait_element(
         self.driver, *OrderLocator.create_batchpay_Button)
     helper.wait_element_visible(
         self.driver, *OrderLocator.create_batchpay_Button)
     batch_opeation = self.driver.find_element(
         *OrderLocator.create_batchpay_Button)
     batch_opeation.click()
Example #16
0
 def refund_partial(self):
     helper.wait_element_visible(self.driver, *OrderLocator.m_refund_amount)
     refund_amount = self.driver.find_element(*OrderLocator.m_refund_amount)
     refund_amount.clear()
     refund_amount.send_keys("0.01")
     remark = self.driver.find_element(*OrderLocator.m_refund_remark)
     remark.clear()
     remark.send_keys("test refund partial by automation")
Example #17
0
 def click_register_button(self):
     helper.wait_element_visible(self.driver,*LogInOutLocators.register_email_Button)
     send_email = self.driver.find_element(
         *LogInOutLocators.register_email_Button)
     send_email.click()
     helper.wait_element_visible(self.driver,
                               *LogInOutLocators.registered_email_Link)
     helper.save_screen_shot(self.driver,"click_register_button_email_link")
Example #18
0
    def refund_not_number(self):
        helper.wait_element_visible(self.driver, *OrderLocator.m_refund_remark)
        refund_amount = self.driver.find_element(*OrderLocator.m_refund_amount)
        refund_amount.clear()
        refund_amount.send_keys(",.[]")

        remark = self.driver.find_element(*OrderLocator.m_refund_remark)
        remark.clear()
        remark.send_keys("test refund not number")
Example #19
0
 def click_batchPay_tab(self):
     helper.save_screen_shot(self.driver,"click_batch_transfer")
     helper.wait_element(
         self.driver, *OrderLocator.batch_transfer_tab)
     helper.wait_element_visible(
         self.driver, *OrderLocator.batch_transfer_tab)
     batch_opeation = self.driver.find_element(
         *OrderLocator.batch_transfer_tab)
     batch_opeation.click()
Example #20
0
 def select_refund_all(self):
     helper.wait_element_visible(self.driver,*OrderLocator.refund_status_Select)
     refund_select = self.driver.find_element(
         *OrderLocator.refund_status_Select)
     refund_select.click()
     helper.wait_element_visible(
         self.driver, *OrderLocator.refund_status_all)
     refund_all = self.driver.find_element(*OrderLocator.refund_status_all)
     refund_all.click()
Example #21
0
    def refund_comment_toolong(self):
        helper.wait_element_visible(self.driver, *OrderLocator.m_refund_remark)
        refund_amount = self.driver.find_element(*OrderLocator.m_refund_amount)
        refund_amount.clear()
        refund_amount.send_keys("0.02")

        remark = self.driver.find_element(*OrderLocator.m_refund_remark)
        remark.clear()
        remark.send_keys("begin-this is comment,this is comment,this is comment,-end")
Example #22
0
    def refund_minus(self):
        helper.wait_element_visible(self.driver, *OrderLocator.m_refund_remark)
        refund_amount = self.driver.find_element(*OrderLocator.m_refund_amount)
        refund_amount.clear()
        refund_amount.send_keys("-1")

        remark = self.driver.find_element(*OrderLocator.m_refund_remark)
        remark.clear()
        remark.send_keys("test refund -1")
Example #23
0
 def select_envelope_type(self):
     helper.wait_element_visible(self.driver,*OrderLocator.order_type_Select)
     order_type_select = self.driver.find_element(
         *OrderLocator.order_type_Select)
     order_type_select.click()
     helper.wait_element_visible(
         self.driver, *OrderLocator.order_type_envelope)
     order_envelope = self.driver.find_element(
         *OrderLocator.order_type_envelope)
     order_envelope.click()
Example #24
0
 def verify_response(self, wh_url):
     url = datagen.get_webhook_url_invalid()
     if wh_url == url:
         helper.wait_element_visible(self.driver,*WebHookLocator.wh_Test_ecode)
         return_code = self.driver.find_element(*WebHookLocator.wh_Test_ecode)
         assert return_code.text != '200'
     else:
         helper.wait_element_visible(self.driver,*WebHookLocator.wh_Test_scode)
         return_code = self.driver.find_element(*WebHookLocator.wh_Test_scode)
         assert return_code.text == '200'
Example #25
0
 def get_channel(self):
     helper.wait_element(
         self.driver, *OrderLocator.channel_first_row)
     helper.wait_element_visible(
         self.driver, *OrderLocator.channel_first_row)
     try:
         channel = self.driver.find_element(*OrderLocator.channel_first_row)
         logging.info(channel.text)
     except Exception,e:
         logging.error(Exception,e)
Example #26
0
 def select_transfer_type(self):
     helper.wait_element_visible(self.driver,*OrderLocator.order_type_Select)
     order_type_select = self.driver.find_element(
         *OrderLocator.order_type_Select)
     order_type_select.click()
     helper.wait_element_visible(
         self.driver, *OrderLocator.order_type_transfer)
     order_transfer = self.driver.find_element(
         *OrderLocator.order_type_transfer)
     order_transfer.click()
Example #27
0
    def select_upacp_pc_channel(self):
        helper.wait_element_visible(self.driver,*OrderLocator.channel_Select)
        channel_select = self.driver.find_element(*OrderLocator.channel_Select)
        channel_select.click()
        time.sleep(1)

        helper.wait_element(self.driver,*OrderLocator.channel_upacp_pc)
        helper.wait_element_visible(self.driver,*OrderLocator.channel_upacp_pc)
        upacp_pc = self.driver.find_element(
            *OrderLocator.channel_upacp_pc)
        upacp_pc.click()
Example #28
0
 def input_refund_amount(self):
     # input refund comment
     helper.save_screen_shot(self.driver,"input_refund_amount_before")
     helper.wait_element(
         self.driver, *OrderLocator.refund_amount)
     helper.wait_element_visible(
         self.driver, *OrderLocator.refund_amount)
     amount = self.driver.find_element(*OrderLocator.refund_amount)
     amount.click()
     amount.clear()
     amount.send_keys("0.05")
Example #29
0
    def input_chargeid_list(self):
        helper.wait_element_visible(self.driver, *OrderLocator.refund_List)
        refundList_text = self.driver.find_element(*OrderLocator.refund_List)
        refundList_text.click()

        charge_list = GetCharge.GetChargeList_NotRefund(0)

        for ch in charge_list:
            refundList_text.send_keys(ch)
            refundList_text.send_keys('\n')
            print ch
Example #30
0
    def verify_no_handel_argument(self):
        helper.wait_element(self.driver,*OrderLocator.argu_Button)
        helper.wait_element_visible(self.driver,*OrderLocator.argu_Button)
        argu_detail = self.driver.find_element(*OrderLocator.argu_Button)
        argu_detail.text.find(u'争议已提交')

        helper.wait_element(self.driver,*OrderLocator.argu_reason)
        helper.wait_element_visible(self.driver,*OrderLocator.argu_reason)
        helper.save_screen_shot(self.driver,"verify_no_handel_argument")
        argu_reason = self.driver.find_element(*OrderLocator.argu_reason)

        assert len(argu_reason.text)>=5