Exemplo n.º 1
0
 def Baidu_news(self):
     '''打开百度新闻\n'''
     lv_2 = 20
     lv_1 = 10
     #网站
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg=
         'Flow:Baidu_news,StepNodeTag:2020091515062370615,Title:网站,Note:')
     iie.open_url(
         ie_path='C:/Program Files (x86)/Internet Explorer/iexplore.exe',
         url='www.baidu.com')
     #鼠标点击
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg=
         'Flow:Baidu_news,StepNodeTag:2020091515075726216,Title:鼠标点击,Note:点击新闻'
     )
     time.sleep(1)
     iie.do_click_pos(waitfor=10.000,
                      run_mode='unctrl',
                      button='left',
                      curson='center',
                      continue_on_error='break',
                      win_title=r'百度一下,你就知道 - Internet Explorer',
                      selector=r'#s-top-left > A:nth-of-type(1)',
                      url=r'https://www.baidu.com/')
     time.sleep(1)
Exemplo n.º 2
0
 def text_input(self):
     password = None
     #网站
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg=
         'Flow:text_input,StepNodeTag:2020091702470364538,Title:网站,Note:')
     iie.open_url(
         ie_path='C:/Program Files (x86)/Internet Explorer/iexplore.exe',
         url='www.baidu.com')
     #设置文本
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg=
         'Flow:text_input,StepNodeTag:2020091702471776644,Title:设置文本,Note:')
     iie.set_text(waitfor=10.000,
                  text=r'RPA',
                  selector=r'.s_ipt',
                  url=r'https://www.baidu.com/')
     #鼠标点击
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg=
         'Flow:text_input,StepNodeTag:2020091703023316894,Title:鼠标点击,Note:')
     iie.do_click_pos(waitfor=10.000,
                      run_mode='unctrl',
                      button='left',
                      curson='center',
                      continue_on_error='break',
                      win_title=r'百度一下,你就知道 - Internet Explorer',
                      selector=r'#su',
                      url=r'https://www.baidu.com/')
Exemplo n.º 3
0
 def Baidu_search(self, pv_1=None):
     input = 'RPA'
     #网站
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg=
         'Flow:Baidu_search,StepNodeTag:2020091702300252617,Title:网站,Note:')
     iie.open_url(
         ie_path='C:/Program Files (x86)/Internet Explorer/iexplore.exe',
         url='www.baidu.com')
     #鼠标点击
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg=
         'Flow:Baidu_search,StepNodeTag:2020091702303042024,Title:鼠标点击,Note:'
     )
     iie.do_click_pos(waitfor=10.000,
                      run_mode='unctrl',
                      button='left',
                      curson='center',
                      continue_on_error='break',
                      win_title=r'百度一下,你就知道 - Internet Explorer',
                      selector=r'#kw',
                      url=r'https://www.baidu.com/')
     #模拟按键
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg=
         'Flow:Baidu_search,StepNodeTag:2020091702310358326,Title:模拟按键,Note:'
     )
     ikeyboard.key_send_cs(waitfor=10.000, text='{LShift}')
     #模拟按键
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg=
         'Flow:Baidu_search,StepNodeTag:2020091702315568728,Title:模拟按键,Note:'
     )
     ikeyboard.key_send_cs(waitfor=10.000, text=input)
     #鼠标点击
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg=
         'Flow:Baidu_search,StepNodeTag:2020091702332197730,Title:鼠标点击,Note:'
     )
     iie.do_click_pos(waitfor=10.000,
                      run_mode='unctrl',
                      button='left',
                      curson='center',
                      continue_on_error='break',
                      win_title=r'百度一下,你就知道 - Internet Explorer',
                      selector=r'#su',
                      url=r'https://www.baidu.com/')
Exemplo n.º 4
0
 def flow2(self):
     yzm_pic = None
     tishi = None
     list_1 = [
         '电子普通发票', '深圳增值税电子普通发票', '91440300MA5EGKDJ92', '2020年06月11日',
         '044031900111', '23838102', '17960524178417916383', '875.29',
         '62.05', '937.34', "[{'row': '1', 'word': '(详见销货清单'}]"
     ]
     dict_info = {
         'AmountInWords': '佰叁拾圆叁角肆分',
         'NoteDrawer': '谢登梅',
         'SellerAddress':
         '深州市龙华区庆湾街道庆津大道乌庆旺路文汇处民治商务中心1栋115栋、2、3栋、4幢009栋7553323188',
         'CommodityPrice': '[]',
         'CommodityNum': '[]',
         'SellerRegisterNum': '91440300689404127F',
         'SellerBank': '农业银行龙华支行41028900040099987',
         'Remarks': '订单号1047426466044621910支付日期2020-06-07',
         'CommodityTaxRate': '[]',
         'TotalTax': '62.05',
         'CheckCode': '17960524178417916383',
         'InvoiceCode': '044031900111',
         'InvoiceDate': '2020年06月11日',
         'PurchaserRegisterNum': '91440300MA5EGKDJ92',
         'InvoiceTypeOrg': '深圳增值税电子普通发票',
         'Password': '',
         'PurchaserBank': '',
         'AmountInFiguers': '937.34',
         'Checker': '郑晓碧',
         'TotalAmount': '875.29',
         'CommodityAmount': "[{'row':'1','word':'875.29'}]",
         'PurchaserName': '深圳市蓝禾技术有限公司',
         'CommodityType': '[]',
         'InvoiceType': '电子普通发票',
         'PurchaserAddress': '',
         'CommodityTax': "[{'row':'1','word':'62.05'}]",
         'CommodityUnit': '[]',
         'Payee': '刘笑额',
         'SellerName': '深圳康润华商贸有限公司',
         'CommodityName': "[{'row':'1','word':'(详见销货清单'}]",
         'InvoiceNum': '23838102'
     }
     code = None
     #网站
     self.__logger.debug('Flow:flow2,StepNodeTag:2317224431623,Note:')
     iie.open_url(url='https://inv-veri.chinatax.gov.cn/index.html')
     time.sleep(0.5)
     # 热键输入
     self.__logger.debug('Flow:flow2,StepNodeTag:240950181343,Note:')
     ikeyboard.key_send_cs(text='#{UP}', waitfor=10)
     time.sleep(2.5)
     # 鼠标点击
     self.__logger.debug('Flow:flow2,StepNodeTag:2317224431622,Note:')
     iie.do_click_pos(win_title=r'国家税务总局全国增值税发票查验平台 - Internet Explorer',
                      url=r'https://inv-veri.chinatax.gov.cn/index.html',
                      selector=r'#fpdm',
                      button=r'left',
                      curson=r'center',
                      times=1,
                      run_mode=r'unctrl',
                      continue_on_error=r'break',
                      waitfor=10)
     time.sleep(0.8)
     # 键盘输入
     self.__logger.debug('Flow:flow2,StepNodeTag:2317224431621,Note:输入发票代码')
     time.sleep(0.5)
     ikeyboard.key_send_cs(text='044031900111', waitfor=10)
     time.sleep(0.6)
     # 键盘输入
     self.__logger.debug('Flow:flow2,StepNodeTag:2317224431620,Note:')
     time.sleep(0.5)
     ikeyboard.key_send_cs(text='{TAB}', waitfor=10)
     # 键盘输入
     self.__logger.debug('Flow:flow2,StepNodeTag:2317224431619,Note:输入发票号码')
     time.sleep(0.5)
     ikeyboard.key_send_cs(text='23838102', waitfor=10)
     # 键盘输入
     self.__logger.debug('Flow:flow2,StepNodeTag:2317224431618,Note:')
     time.sleep(0.5)
     ikeyboard.key_send_cs(text='{TAB}', waitfor=10)
     # 键盘输入
     self.__logger.debug('Flow:flow2,StepNodeTag:2317224431617,Note:开票日期')
     time.sleep(0.5)
     ikeyboard.key_send_cs(text='20200611', waitfor=10)
     # 键盘输入
     self.__logger.debug('Flow:flow2,StepNodeTag:2317224431616,Note:')
     time.sleep(0.5)
     ikeyboard.key_send_cs(text='{TAB}', waitfor=10)
     # 图像检测
     self.__logger.debug('Flow:flow2,StepNodeTag:2317224431613,Note:判断输入内容')
     tvar2317224431613 = iimg.img_exists(
         win_title=r'国家税务总局全国增值税发票查验平台 - Internet Explorer',
         img_res_path=self.path,
         image=r'snapshot_20200623142820581.png',
         fuzzy=True,
         confidence=0.85,
         waitfor=30)
     time.sleep(0.5)
     # IF-N分支
     self.__logger.debug('Flow:flow2,StepNodeTag:2317224431614,Note:判断')
     if tvar2317224431613:
         # 键盘输入
         self.__logger.debug(
             'Flow:flow2,StepNodeTag:2317224431612,Note:输入校验码')
         time.sleep(0.5)
         ikeyboard.key_send_cs(text='916383', waitfor=10)
     else:
         # 键盘输入
         self.__logger.debug(
             'Flow:flow2,StepNodeTag:2317224431615,Note:输入开具金额')
         time.sleep(0.5)
         ikeyboard.key_send_cs(text='937.34', waitfor=10)
     # While循环
     self.__logger.debug('Flow:flow2,StepNodeTag:2317224431611,Note:')
     while 1:
         # 鼠标点击
         self.__logger.debug('Flow:flow2,StepNodeTag:2317224431627,Note:')
         time.sleep(0.5)
         iie.do_click_pos(
             win_title=r'国家税务总局全国增值税发票查验平台 - Internet Explorer',
             url=r'https://inv-veri.chinatax.gov.cn/index.html',
             selector=r'#yzm_img',
             button=r'left',
             curson=r'center',
             times=1,
             run_mode=r'unctrl',
             continue_on_error=r'break',
             waitfor=10)
         time.sleep(5)
         # 鼠标移动
         self.__logger.debug('Flow:flow2,StepNodeTag:2317224431628,Note:')
         iie.do_moveto_pos(
             win_title=r'国家税务总局全国增值税发票查验平台 - Internet Explorer',
             url=r'https://inv-veri.chinatax.gov.cn/index.html',
             selector=
             r'#content2 > TABLE:nth-of-type(1) > TBODY:nth-of-type(1) > TR:nth-of-type(6) > TD:nth-of-type(1)',
             curson=r'center',
             waitfor=10)
         time.sleep(5)
         # 截图
         self.__logger.debug('Flow:flow2,StepNodeTag:2317224431610,Note:')
         tishi = iimg.capture_image(
             win_title=r'国家税务总局全国增值税发票查验平台 - Internet Explorer',
             win_text=r'',
             left_indent=1253,
             top_indent=572,
             width=210,
             height=36,
             waitfor=30)
         time.sleep(0.8)
         # 截图
         self.__logger.debug('Flow:flow2,StepNodeTag:231722443169,Note:')
         yzm_pic = iimg.capture_image(
             win_title=r'国家税务总局全国增值税发票查验平台 - Internet Explorer',
             win_text=r'',
             left_indent=992,
             top_indent=620,
             width=139,
             height=64,
             waitfor=30)
         time.sleep(0.8)
         # 自定义函数
         self.__logger.debug('Flow:flow2,StepNodeTag:2317224431625,Note:')
         tvar2317224431625 = GlobalFun.code_color(tishi, yzm_pic)
         #验证码
         self.__logger.debug('Flow:flow2,StepNodeTag:231722443168,Note:')
         code = iocr.vcode_recognize(
             image_path=tvar2317224431625,
             code_type=8001,
             apiKey='8159a500cc9d4a69a71e6ac14263f029',
             secretKey='2d078aa8c13741239b3d00ced85832e3')
         time.sleep(1)
         # 鼠标点击
         self.__logger.debug('Flow:flow2,StepNodeTag:2317224431629,Note:')
         iie.do_click_pos(
             win_title=r'国家税务总局全国增值税发票查验平台 - Internet Explorer',
             url=r'https://inv-veri.chinatax.gov.cn/index.html',
             selector=r'#yzm',
             button=r'left',
             curson=r'center',
             times=1,
             run_mode=r'unctrl',
             continue_on_error=r'break',
             waitfor=10)
         # 键盘输入
         self.__logger.debug('Flow:flow2,StepNodeTag:2317224431626,Note:')
         time.sleep(0.5)
         ikeyboard.key_send_cs(text=code, waitfor=10)
         # 鼠标点击
         self.__logger.debug('Flow:flow2,StepNodeTag:2317224431631,Note:')
         iie.do_click_pos(
             win_title=r'国家税务总局全国增值税发票查验平台 - Internet Explorer',
             url=r'https://inv-veri.chinatax.gov.cn/index.html',
             selector=r'#checkfp',
             button=r'left',
             curson=r'center',
             times=1,
             run_mode=r'unctrl',
             continue_on_error=r'break',
             waitfor=10)
         time.sleep(3)
         # 图像检测
         self.__logger.debug('Flow:flow2,StepNodeTag:2317224431630,Note:')
         tvar2317224431630 = iimg.img_exists(
             win_title=r'国家税务总局全国增值税发票查验平台 - Internet Explorer',
             img_res_path=self.path,
             image=r'snapshot_20200623152556855.png',
             fuzzy=True,
             confidence=0.85,
             waitfor=5)
         # IF-N分支
         self.__logger.debug('Flow:flow2,StepNodeTag:2317224431632,Note:')
         if tvar2317224431630:
             # 鼠标点击
             self.__logger.debug(
                 'Flow:flow2,StepNodeTag:2317224431634,Note:')
             iie.do_click_pos(
                 win_title=r'国家税务总局全国增值税发票查验平台 - Internet Explorer',
                 url=r'https://inv-veri.chinatax.gov.cn/index.html',
                 selector=r'#popup_ok',
                 button=r'left',
                 curson=r'center',
                 times=1,
                 run_mode=r'unctrl',
                 continue_on_error=r'break',
                 waitfor=10)
             time.sleep(0.8)
             # 鼠标点击
             self.__logger.debug(
                 'Flow:flow2,StepNodeTag:2317224431635,Note:')
             iie.do_click_pos(
                 win_title=r'国家税务总局全国增值税发票查验平台 - Internet Explorer',
                 url=r'https://inv-veri.chinatax.gov.cn/index.html',
                 selector=r'#yzm',
                 button=r'left',
                 curson=r'center',
                 times=1,
                 run_mode=r'unctrl',
                 continue_on_error=r'break',
                 waitfor=10)
             time.sleep(0.8)
             # 热键输入
             self.__logger.debug(
                 'Flow:flow2,StepNodeTag:2317224431636,Note:')
             ikeyboard.key_send_cs(text='^a', waitfor=10)
             # 键盘输入
             self.__logger.debug(
                 'Flow:flow2,StepNodeTag:2317224431637,Note:')
             time.sleep(0.5)
             ikeyboard.key_send_cs(text='{BACKSPACE}', waitfor=10)
         else:
             # Break中断
             self.__logger.debug(
                 'Flow:flow2,StepNodeTag:2317224431633,Note:')
             break
     # 图像检测
     self.__logger.debug('Flow:flow2,StepNodeTag:2317224431639,Note:')
     tvar2317224431639 = iimg.img_exists(
         win_title=r'国家税务总局全国增值税发票查验平台 - Internet Explorer',
         img_res_path=self.path,
         image=r'snapshot_20200623153842415.png',
         fuzzy=True,
         confidence=0.85,
         waitfor=5)
     # IF-N分支
     self.__logger.debug('Flow:flow2,StepNodeTag:2317224431638,Note:')
     if tvar2317224431639:
         # 代码块
         self.__logger.debug('Flow:flow2,StepNodeTag:2317224431745,Note:')
         list_1.append('否')
         #单元格写入
         self.__logger.debug('Flow:flow2,StepNodeTag:2317224431640,Note:')
         iexcel.write_cell(path='C:/Users/jky/Desktop/fapiao_info.xlsx',
                           cell='A2',
                           text=list_1,
                           file_type='excel')
         # 鼠标点击
         self.__logger.debug('Flow:flow2,StepNodeTag:2317224431642,Note:')
         iie.do_click_pos(
             win_title=r'国家税务总局全国增值税发票查验平台 - Internet Explorer',
             url=r'https://inv-veri.chinatax.gov.cn/index.html',
             selector=r'#closebt',
             button=r'left',
             curson=r'center',
             times=1,
             run_mode=r'unctrl',
             continue_on_error=r'break',
             waitfor=10)
         # 消息框
         self.__logger.debug('Flow:flow2,StepNodeTag:2317224431747,Note:')
         ibox.msgs_box('结束', timeout=0)
     else:
         # 代码块
         self.__logger.debug('Flow:flow2,StepNodeTag:2317224431746,Note:')
         list_1.append('是')
         #单元格写入
         self.__logger.debug('Flow:flow2,StepNodeTag:2317224431641,Note:')
         iexcel.write_cell(path='C:/Users/jky/Desktop/fapiao_info.xlsx',
                           cell='A2',
                           text=list_1,
                           file_type='excel')
         # 鼠标点击
         self.__logger.debug('Flow:flow2,StepNodeTag:23174311384140,Note:')
         iie.do_click_pos(
             win_title=r'国家税务总局全国增值税发票查验平台 - Internet Explorer',
             url=r'https://inv-veri.chinatax.gov.cn/index.html',
             selector=r'#closebt',
             button=r'left',
             curson=r'center',
             times=1,
             run_mode=r'unctrl',
             continue_on_error=r'break',
             waitfor=10)
         # 消息框
         self.__logger.debug('Flow:flow2,StepNodeTag:2317224431743,Note:')
         ibox.msgs_box('结束', timeout=3)
Exemplo n.º 5
0
 def Main(self):
     #网站
     self.__logger.debug(' "StepNodeTag:171243492372",Note:')
     iie.open_url(url='www.baidu.com')
Exemplo n.º 6
0
 def CSM_demo(self):
     product_code = 'i-search-20200917-0351'
     #网站
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg=
         'Flow:CSM_demo,StepNodeTag:2020091703094021399,Title:网站,Note:')
     iie.open_url(
         ie_path='C:/Program Files (x86)/Internet Explorer/iexplore.exe',
         url='http://122.112.200.222:9080/login.action')
     #设置文本
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg=
         'Flow:CSM_demo,StepNodeTag:20200917031229648101,Title:设置文本,Note:')
     iie.set_text(
         waitfor=10.000,
         text=r'ceshi001',
         selector=
         r'#loginWrap > UL:nth-of-type(1) > LI:nth-of-type(1) > INPUT:nth-of-type(1)',
         url=r'http://122.112.200.222:9080/login.action')
     #设置文本
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg=
         'Flow:CSM_demo,StepNodeTag:20200917031301891104,Title:设置文本,Note:')
     iie.set_text(
         waitfor=10.000,
         text=r'typSVU',
         selector=
         r'#loginWrap > UL:nth-of-type(1) > LI:nth-of-type(2) > INPUT:nth-of-type(1)',
         url=r'http://122.112.200.222:9080/login.action')
     #鼠标点击
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg=
         'Flow:CSM_demo,StepNodeTag:20200917031353836106,Title:鼠标点击,Note:')
     iie.do_click_pos(
         waitfor=10.000,
         run_mode='unctrl',
         button='left',
         curson='center',
         continue_on_error='break',
         win_title=r'双录系统-录音、录像、录屏 - Internet Explorer',
         selector=
         r'#loginWrap > UL:nth-of-type(1) > LI:nth-of-type(2) > INPUT:nth-of-type(2)',
         url=r'http://122.112.200.222:9080/login.action')
     #鼠标点击
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg=
         'Flow:CSM_demo,StepNodeTag:20200917031452058108,Title:鼠标点击,Note:')
     iie.do_click_pos(waitfor=10.000,
                      run_mode='unctrl',
                      button='left',
                      curson='center',
                      continue_on_error='break',
                      win_title=r'双录系统-录音、录像、录屏 - Internet Explorer',
                      selector=r'#popup_ok',
                      url=r'http://122.112.200.222:9080/login.action')
     #鼠标点击
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg=
         'Flow:CSM_demo,StepNodeTag:20200917031802702110,Title:鼠标点击,Note:')
     iie.do_click_pos(
         waitfor=10.000,
         run_mode='unctrl',
         button='left',
         curson='center',
         continue_on_error='break',
         win_title=r'双录系统-录音、录像、录屏 - Internet Explorer',
         selector=
         r'#frame-nav > UL:nth-of-type(1) > LI:nth-of-type(1) > A:nth-of-type(1)',
         url=r'http://122.112.200.222:9080/login.action')
     #鼠标点击
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg=
         'Flow:CSM_demo,StepNodeTag:20200917031836401112,Title:鼠标点击,Note:')
     iie.do_click_pos(
         waitfor=10.000,
         run_mode='unctrl',
         button='left',
         curson='center',
         continue_on_error='break',
         win_title=r'双录系统-录音、录像、录屏 - Internet Explorer',
         selector=
         r'#MenuContext > TABLE:nth-of-type(1) > TBODY:nth-of-type(1) > TR:nth-of-type(1) > TD:nth-of-type(2) > LI:nth-of-type(5) > A:nth-of-type(1)',
         url=r'http://122.112.200.222:9080/login.action')
     #鼠标点击
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg=
         'Flow:CSM_demo,StepNodeTag:20200917031929670114,Title:鼠标点击,Note:')
     iie.do_click_pos(
         waitfor=10.000,
         run_mode='unctrl',
         button='left',
         curson='center',
         continue_on_error='break',
         win_title=r'双录系统-录音、录像、录屏 - Internet Explorer',
         selector=
         r'#ListForm > DIV:nth-of-type(2) > DIV:nth-of-type(1) > DIV:nth-of-type(1) > A:nth-of-type(2)',
         title=r'理财管理')
     #设置文本
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg=
         'Flow:CSM_demo,StepNodeTag:20200917032133267116,Title:设置文本,Note:')
     iie.set_text(
         waitfor=10.000,
         text=product_code,
         selector=
         r'body > DIV:nth-of-type(1) > FORM:nth-of-type(1) > DIV:nth-of-type(1) > DIV:nth-of-type(2) > UL:nth-of-type(1) > LI:nth-of-type(1) > INPUT:nth-of-type(1)',
         title=r'理财管理')
     #设置文本
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg=
         'Flow:CSM_demo,StepNodeTag:20200917032229059118,Title:设置文本,Note:')
     iie.set_text(
         waitfor=10.000,
         text=r'LL-demo',
         selector=
         r'body > DIV:nth-of-type(1) > FORM:nth-of-type(1) > DIV:nth-of-type(1) > DIV:nth-of-type(2) > UL:nth-of-type(1) > LI:nth-of-type(2) > INPUT:nth-of-type(1)',
         title=r'理财管理')
     #设置文本
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg=
         'Flow:CSM_demo,StepNodeTag:20200917032304015120,Title:设置文本,Note:')
     iie.set_text(waitfor=10.000,
                  text=r'S8',
                  selector=r'#proType',
                  title=r'理财管理')
     #设置文本
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg=
         'Flow:CSM_demo,StepNodeTag:20200917032344848122,Title:设置文本,Note:')
     iie.set_text(waitfor=10.000,
                  text=r'5',
                  selector=r'#proRiskLevel',
                  title=r'理财管理')
     #设置文本
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg=
         'Flow:CSM_demo,StepNodeTag:20200917032410932124,Title:设置文本,Note:')
     iie.set_text(waitfor=10.000,
                  text=r'3',
                  selector=r'#videoDtaTime',
                  title=r'理财管理')
     #设置文本
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg=
         'Flow:CSM_demo,StepNodeTag:20200917032513188130,Title:设置文本,Note:')
     iie.set_text(waitfor=10.000,
                  text=r'刘浪测试',
                  selector=r'#proDesc',
                  title=r'理财管理')
     #鼠标点击
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg=
         'Flow:CSM_demo,StepNodeTag:20200917032903457132,Title:鼠标点击,Note:')
     iie.do_click_pos(
         waitfor=5.000,
         run_mode='unctrl',
         button='left',
         curson='center',
         continue_on_error='break',
         win_title=r'双录系统-录音、录像、录屏 - Internet Explorer',
         selector=
         r'#DetailForm > DIV:nth-of-type(1) > DIV:nth-of-type(3) > INPUT:nth-of-type(1)',
         title=r'理财管理')
Exemplo n.º 7
0
 def flow2(self):
     yzm_pic = None
     tishi = None
     list_1 = [
         '电子普通发票', '深圳增值税电子普通发票', '91440300MA5EGKDJ92', '2020年06月11日',
         '044031900111', '23838102', '17960524178417916383', '875.29',
         '62.05', '937.34', "[{'row': '1', 'word': '(详见销货清单'}]"
     ]
     dict_info = {
         'AmountInWords': '佰叁拾圆叁角肆分',
         'NoteDrawer': '谢登梅',
         'SellerAddress':
         '深州市龙华区庆湾街道庆津大道乌庆旺路文汇处民治商务中心1栋115栋、2、3栋、4幢009栋7553323188',
         'CommodityPrice': '[]',
         'CommodityNum': '[]',
         'SellerRegisterNum': '91440300689404127F',
         'SellerBank': '农业银行龙华支行41028900040099987',
         'Remarks': '订单号1047426466044621910支付日期2020-06-07',
         'CommodityTaxRate': '[]',
         'TotalTax': '62.05',
         'CheckCode': '17960524178417916383',
         'InvoiceCode': '044031900111',
         'InvoiceDate': '2020年06月11日',
         'PurchaserRegisterNum': '91440300MA5EGKDJ92',
         'InvoiceTypeOrg': '深圳增值税电子普通发票',
         'Password': '',
         'PurchaserBank': '',
         'AmountInFiguers': '937.34',
         'Checker': '郑晓碧',
         'TotalAmount': '875.29',
         'CommodityAmount': "[{'row':'1','word':'875.29'}]",
         'PurchaserName': '深圳市蓝禾技术有限公司',
         'CommodityType': '[]',
         'InvoiceType': '电子普通发票',
         'PurchaserAddress': '',
         'CommodityTax': "[{'row':'1','word':'62.05'}]",
         'CommodityUnit': '[]',
         'Payee': '刘笑额',
         'SellerName': '深圳康润华商贸有限公司',
         'CommodityName': "[{'row':'1','word':'(详见销货清单'}]",
         'InvoiceNum': '23838102'
     }
     code = None
     #网站
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg='Flow:flow2,StepNodeTag:2317224431623,Title:网站,Note:')
     time.sleep(0.5)
     iie.open_url(
         ie_path='C:/Program Files (x86)/Internet Explorer/iexplore.exe',
         url='https://inv-veri.chinatax.gov.cn/index.html')
     time.sleep(0.5)
     # Try异常
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg=
         'Flow:flow2,StepNodeTag:20201027172041803566,Title:Try异常,Note:')
     try:
         #鼠标点击
         self.__logger.dlogs(
             job_no=self.job_no,
             logmsg=
             'Flow:flow2,StepNodeTag:20201027172049219568,Title:鼠标点击,Note:')
         iimg.do_click_pos(waitfor=30.000,
                           button='left',
                           curson='Center',
                           image=r'snapshot_20201029175005894.png',
                           image_size=r'64X15',
                           win_title=r'此站点不安全 - Internet Explorer',
                           continue_on_error='break',
                           img_res_path=self.path)
         #鼠标点击
         self.__logger.dlogs(
             job_no=self.job_no,
             logmsg=
             'Flow:flow2,StepNodeTag:20201027172102123570,Title:鼠标点击,Note:')
         iimg.do_click_pos(waitfor=30.000,
                           button='left',
                           curson='Center',
                           image=r'snapshot_20201029175415351.png',
                           image_size=r'161X28',
                           win_title=r'此站点不安全 - Internet Explorer',
                           continue_on_error='break',
                           img_res_path=self.path)
     except Exception as e:
         pass
     finally:
         pass
     #热键输入
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg='Flow:flow2,StepNodeTag:240950181343,Title:热键输入,Note:')
     ikeyboard.key_send_cs(waitfor=10.000, text=r'#{UP}')
     time.sleep(2.5)
     #鼠标点击
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg='Flow:flow2,StepNodeTag:2317224431622,Title:鼠标点击,Note:')
     iie.do_click_pos(waitfor=10.000,
                      run_mode='unctrl',
                      button='left',
                      curson='center',
                      continue_on_error='break',
                      win_title=r'国家税务总局全国增值税发票查验平台 - Internet Explorer',
                      selector=r'#fpdm',
                      url=r'https://inv-veri.chinatax.gov.cn/index.html')
     time.sleep(0.8)
     #模拟按键
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg='Flow:flow2,StepNodeTag:2317224431621,Title:模拟按键,Note:输入发票代码'
     )
     time.sleep(0.5)
     ikeyboard.key_send_cs(waitfor=10.000, text='044031900111')
     time.sleep(0.6)
     #模拟按键
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg='Flow:flow2,StepNodeTag:2317224431620,Title:模拟按键,Note:')
     time.sleep(0.5)
     ikeyboard.key_send_cs(waitfor=10.000, text='{TAB}')
     #模拟按键
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg='Flow:flow2,StepNodeTag:2317224431619,Title:模拟按键,Note:输入发票号码'
     )
     time.sleep(0.5)
     ikeyboard.key_send_cs(waitfor=10.000, text='23838102')
     #模拟按键
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg='Flow:flow2,StepNodeTag:2317224431618,Title:模拟按键,Note:')
     time.sleep(0.5)
     ikeyboard.key_send_cs(waitfor=10.000, text='{TAB}')
     #模拟按键
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg='Flow:flow2,StepNodeTag:2317224431617,Title:模拟按键,Note:开票日期')
     time.sleep(0.5)
     ikeyboard.key_send_cs(waitfor=10.000, text='20200611')
     #模拟按键
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg='Flow:flow2,StepNodeTag:2317224431616,Title:模拟按键,Note:')
     time.sleep(0.5)
     ikeyboard.key_send_cs(waitfor=10.000, text='{Tab}')
     #图片检测
     self.__logger.dlogs(
         job_no=self.job_no,
         logmsg='Flow:flow2,StepNodeTag:2317224431613,Title:图片检测,Note:判断输入内容'
     )
     tvar_2020102717112596416 = iimg.img_exists(
         waitfor=30.000,
         win_title=r'国家税务总局全国增值税发票查验平台 - Internet Explorer',
         image=r'snapshot_20201030101359793.png',
         img_res_path=self.path)
     print('[flow2] [图片检测] [2317224431613]  返回值:[' +
           str(type(tvar_2020102717112596416)) + ']' +
           str(tvar_2020102717112596416))
     time.sleep(0.5)