Exemple #1
0
 def count_curr_busi_log_num(self):
     self.driver.switch_to_frame('x,//*[@id="servicelogReportFrame"]')
     a = self.driver.get_element('x,//*[@id="paging_xf"]').get_attribute(
         'style')
     if a == 'display: block;':
         new_paging = NewPaging(self.driver, self.base_url)
         total = new_paging.get_totals_number('x,//*[@id="paging_xf"]',
                                              'x,//*[@id="logslist_xf"]')
         self.driver.default_frame()
         return total
     elif a == 'display: none;':
         self.driver.default_frame()
         return 0
Exemple #2
0
    def get_log_in_log_total(self):
        # 获取登录日志的条数
        self.driver.switch_to_frame('x,//*[@id="loginReportFrame"]')
        a = self.driver.get_element(
            'x,//*[@id="paging_login_log"]').get_attribute('style')

        if a == 'display: block;':
            new_paging = NewPaging(self.driver, self.base_url)
            total = new_paging.get_totals_number(
                'x,//*[@id="paging_login_log"]', 'x,//*[@id="loginLog-tbody"]')
            self.driver.default_frame()
            return total
        elif a == 'display: none;':
            self.driver.default_frame()
            return 0