Exemplo n.º 1
0
 def click_my_initiate_link(self):
     """
     点击我拟办的链接
     :return:
     """
     js = '$("ul.navleft >li:eq(3) > a").click()'
     for i in range(10):
         try:
             api.execute_script(js)
             if api.get_current_url().find(
                     '/app/Workflow/MyInstance') != -1:
                 logger().info('页面跳转成功')
                 break
         except:
             pass
         time.sleep(2)
Exemplo n.º 2
0
 def click_add_workflow_link(self):
     """
     点击新建流程链接
     :return:
     """
     js = '$("ul.navleft >li:eq(5) > a").click()'
     for i in range(10):
         try:
             api.execute_script(js)
             if api.get_current_url().find('/app/Workflow/MyWorkflow'
                                           ) != -1 and api.el_is_display(
                                               self.test_workflow_link):
                 logger().info('页面跳转成功')
                 break
         except:
             pass
         time.sleep(2)