Exemple #1
0
 def del_user(self, group_name, user_name):
     """
     删除指定用户组下面的指定用户
     :param group_name: 用户组名称
     :param user_name: 用户名称
     :return: None
     """
     user_manager_window = api.level_2_window(self.browser)
     self.find_user(group_name, user_name).click()
     self.menu_page.del_user_button(user_manager_window).click()
     level_3_window = api.level_3_window(self.browser)
     api.level_window_button(level_3_window, '确定').click()
Exemple #2
0
 def del_user_group(self, group_name):
     """
     删除用户组
     :param group_name: 用户组名称
     :return: None
     """
     user_manager_window = api.level_2_window(self.browser)
     self.menu_page.find_group_by_name(user_manager_window, group_name).click()
     time.sleep(0.5)
     self.menu_page.group_button(user_manager_window, group_name, 1).click()
     time.sleep(0.5)
     prompt_window = api.level_3_window(self.browser)
     self.menu_page.confirm_button(prompt_window).click()
Exemple #3
0
 def add_user_group(self, group_name):
     """
     新增用户组
     :param group_name: 用户组名称
     :return: None
     """
     user_manager_window = api.level_2_window(self.browser)
     self.menu_page.add_user_group_button(user_manager_window).click()
     time.sleep(0.5)
     add_group_window = api.level_3_window(self.browser)
     self.menu_page.user_group_input(add_group_window).send_keys(group_name)
     time.sleep(0.5)
     self.menu_page.confirm_button(add_group_window).click()
Exemple #4
0
 def add_user(self, group_name, user_name):
     """
     指定用户组下新增用户
     :param group_name: 用户组名称
     :param user_name: 用户名
     :return: None
     """
     user_manager_window = api.level_2_window(self.browser)
     # 点击选中用户组,在该用户组下新增用户
     self.find_user_group(group_name).click()
     self.menu_page.add_user_button(user_manager_window).click()
     # 打开的新增用户窗口输入信息保存
     add_user_window = api.level_3_window(self.browser)
     self.menu_page.user_name_input(add_user_window).send_keys(user_name)
     self.menu_page.confirm_button(add_user_window).click()
 def close_level_3_window(self):
     """"""
     level_3_window = api.level_3_window(self.browser)
     api.close_window_button(level_3_window).click()
Exemple #6
0
 def click_confirm_button(self):
     """"""
     prompt_window = api.level_3_window(self.browser)
     api.level_window_button(prompt_window, '确定').click()