コード例 #1
0
ファイル: order_page.py プロジェクト: hjonwy/jjAuto
 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()
コード例 #2
0
ファイル: order_page.py プロジェクト: hjonwy/jjAuto
 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")
コード例 #3
0
ファイル: order_page.py プロジェクト: hjonwy/jjAuto
 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)
コード例 #4
0
ファイル: order_page.py プロジェクト: hjonwy/jjAuto
 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
コード例 #5
0
ファイル: order_page.py プロジェクト: hjonwy/jjAuto
 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")
コード例 #6
0
ファイル: order_page.py プロジェクト: hjonwy/jjAuto
 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
コード例 #7
0
ファイル: debug_page.py プロジェクト: hjonwy/jjAuto
 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()
コード例 #8
0
ファイル: order_page.py プロジェクト: hjonwy/jjAuto
 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")
コード例 #9
0
ファイル: debug_page.py プロジェクト: hjonwy/jjAuto
 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
コード例 #10
0
ファイル: order_page.py プロジェクト: hjonwy/jjAuto
    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()
コード例 #11
0
ファイル: appInfo_page.py プロジェクト: hjonwy/jjAuto
 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)
コード例 #12
0
ファイル: order_page.py プロジェクト: hjonwy/jjAuto
 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)
コード例 #13
0
ファイル: order_page.py プロジェクト: hjonwy/jjAuto
 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()
コード例 #14
0
ファイル: order_page.py プロジェクト: hjonwy/jjAuto
 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()
コード例 #15
0
ファイル: order_page.py プロジェクト: hjonwy/jjAuto
 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()
コード例 #16
0
ファイル: order_page.py プロジェクト: hjonwy/jjAuto
 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")
コード例 #17
0
ファイル: register_page.py プロジェクト: hjonwy/jjAuto
 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")
コード例 #18
0
ファイル: order_page.py プロジェクト: hjonwy/jjAuto
    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")
コード例 #19
0
ファイル: order_page.py プロジェクト: hjonwy/jjAuto
 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()
コード例 #20
0
ファイル: order_page.py プロジェクト: hjonwy/jjAuto
 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()
コード例 #21
0
ファイル: order_page.py プロジェクト: hjonwy/jjAuto
    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")
コード例 #22
0
ファイル: order_page.py プロジェクト: hjonwy/jjAuto
    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")
コード例 #23
0
ファイル: order_page.py プロジェクト: hjonwy/jjAuto
 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()
コード例 #24
0
ファイル: webhook_page.py プロジェクト: hjonwy/jjAuto
 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'
コード例 #25
0
ファイル: order_page.py プロジェクト: hjonwy/jjAuto
 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)
コード例 #26
0
ファイル: order_page.py プロジェクト: hjonwy/jjAuto
 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()
コード例 #27
0
ファイル: order_page.py プロジェクト: hjonwy/jjAuto
    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()
コード例 #28
0
ファイル: order_page.py プロジェクト: hjonwy/jjAuto
 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")
コード例 #29
0
ファイル: order_page.py プロジェクト: hjonwy/jjAuto
    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
コード例 #30
0
ファイル: order_page.py プロジェクト: hjonwy/jjAuto
    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