def __init__(self, driver):
     super().__init__(driver)
     elements = ElementdataUtils('product',
                                 'product_page').get_element_info()
     self.add_product_button = elements['add_product_button']
     self.add_product_assert = elements['add_product_assert']
     self.product_name_input = elements['product_name_input']
     self.product_name_null_assert = elements['product_name_null_assert']
     self.product_code_input = elements['product_code_input']
     self.product_line_button = elements['product_line_button']
     self.product_line_name_input = elements['product_line_name_input']
     self.product_line_abbreviation_input = elements[
         'product_line_abbreviation_input']
     self.product_line_add_button = elements['product_line_add_button']
     self.product_line_del_button = elements['product_line_del_button']
     self.product_line_save_button = elements['product_line_save_button']
     self.product_line_back_button = elements['product_line_back_button']
     self.product_line_close_button = elements['product_line_close_button']
     self.product_principal_button = elements['product_principal_button']
     self.product_principal_choice = elements['product_principal_choice']
     self.test_principal_button = elements['test_principal_button']
     self.test_principal_choice = elements['test_principal_choice']
     self.issue_principal_button = elements['issue_principal_button']
     self.issue_principal_choice = elements['issue_principal_choice']
     self.product_describe_input = elements['product_describe_input']
     self.default_choice_visit = elements['default_choice_visit']
     self.private_choice_visit = elements['private_choice_visit']
     self.custom_choice_visit = elements['custom_choice_visit']
     self.save_button = elements['save_button']
     self.back_button = elements['back_button']
Ejemplo n.º 2
0
 def __init__(self,driver):
     super().__init__(driver)
     # self.companyname_showbox =  {'element_name':'公司名称',
     #                           'locator_type':'xpath',
     #                           'locator_value':'//h1[@id="companyname"]',
     #                           'timeout':5}
     # self.myzone_menu =  {'element_name':'我的地盘菜单',
     #                           'locator_type':'xpath',
     #                           'locator_value':'//li[@data-id="my"]',
     #                           'timeout':5}
     # self.product_menu = {'element_name': '产品菜单',
     #                     'locator_type': 'xpath',
     #                     'locator_value': '//li[@data-id="product"]',
     #                     'timeout': 5}
     # self.username_showbox = {'element_name': '用户按钮',
     #                     'locator_type': 'xpath',
     #                     'locator_value': '//span[@class="user-name"]',
     #                     'timeout': 5}
     elements = ElementdataUtils('main_page').get_element_info()
     self.companyname_showbox = elements['companyname_showbox']
     self.myzone_menu = elements['myzone_menu']
     self.product_menu = elements['product_menu']
     self.username_showbox = elements['username_showbox']
     self.story_button = elements['story_button']
     self.plan_button = elements['plan_button']
     self.release_button = elements['release_button']
     self.roadmap_button = elements['roadmap_button']
     self.project_button = elements['project_button']
     self.dynamic_button = elements['dynamic_button']
     self.doc_button = elements['doc_button']
Ejemplo n.º 3
0
 def __init__(self,driver):
     super().__init__(driver)
     ####-----------------第一种方式,直接写字典形式---------------------####
     # self.username_inputbox = {'element_name':'用户名输入框',
     #                           'locator_type':'xpath',
     #                           'locator_value':'//input[@name="account"]',
     #                           'timeout': 5 }
     # self.password_inputbox = {'element_name': '密码输入框',
     #                           'locator_type': 'xpath',
     #                           'locator_value': '//input[@name="password"]',
     #                           'timeout': 4}
     # self.login_button = {'element_name': '登录按钮',
     #                           'locator_type': 'xpath',
     #                           'locator_value': '//button[@id="submit"]',
     #                           'timeout': 2}
     ####-----------------第二种方式,使用excecl读取---------------------####
     elements = ElementdataUtils('login','login_page').get_element_info()
     ####-----------------第三种方式,使用yaml读取---------------------####
     # current_path = os.path.dirname(__file__)
     # yaml_path = os.path.join(current_path, '../element_info_datas/element_login_infos.yaml')
     # elements=ElementdataYamlUtils().get_yaml_element_info(yaml_path)
     #####公共###
     self.username_inputbox =elements['username_inputbox']
     self.password_inputbox=elements['password_inputbox']
     self.login_button=elements['login_button']
     self.change_language=elements['change_language']
Ejemplo n.º 4
0
 def __init__(self, driver):
     super().__init__(driver)  # 子类调用父类的属性
     elements = ElementdataUtils('main','main_page').get_element_info()
     self.companyname_showbox =elements['companyname_showbox']
     self.myzone_menu=elements['myzone_menu']
     self.product_menu=elements['product_menu']
     self.username_showspan=elements['username_showspan']
     self.project_menu=elements['project_menu']
     self.test_menu=elements['test_menu']
     self.file_menu=elements['file_menu']
     self.user_menu=elements['user_menu']
     self.quit_button=elements['quit_button']
     # 以下元素用于校验link跳转
     self.myzone_menu_homepage=elements['myzone_menu_homepage']
     self.product_menu_productpage=elements['product_menu_productpage']
     self.project_menu_projectpage=elements['project_menu_projectpage']
     self.test_menu_testpage=elements['test_menu_testpage']
     self.file_menu_filepage=elements['file_menu_filepage']
     # 以下元素用于校验搜索功能
     self.search_general_options=elements['search_general_options']
     self.search_options_bug=elements['search_options_bug']
     self.search_options_story=elements['search_options_story']
     self.search_options_task=elements['search_options_task']
     self.search_options_testcase=elements['search_options_testcase']
     self.search_options_project=elements['search_options_project']
     self.search_options_product=elements['search_options_product']
     self.search_input =elements['search_input ']
     self.search_go_button=elements['search_go_button']
     self.title_bug_story_task_testcase=elements['title_bug_story_task_testcase']
     self.title_project_product=elements['title_project_product']
Ejemplo n.º 5
0
 def __init__(self, driver):
     super().__init__(driver)
     elements = ElementdataUtils('main', 'main_page').get_element_info()
     self.myzone_link = elements['myzone_link']
     self.user_menu = elements['user_menu']
     self.quit_button = elements['quit_button']
     self.project_menu = elements['project_menu']
     self.product_menu = elements['product_menu']
Ejemplo n.º 6
0
 def __init__(self, driver):
     super().__init__(driver)
     # 调用ElementdataUtils 类,使用excel元素信息
     elements = ElementdataUtils('login', 'login_page').get_element_info()
     self.kaiyuan_click = elements['kaiyuan_click']
     self.username_inputbox = elements['username_inputbox']
     self.password_inputbox = elements['password_inputbox']
     self.login_button = elements['login_button']
Ejemplo n.º 7
0
 def __init__(self, driver):  # 属性==》页面的控件
     super().__init__(driver)
     elements = ElementdataUtils('main', 'main_page').get_element_info()
     self.companyname_showbox = elements['companyname_showbox']
     self.myzone_menu = elements['myzone_menu']
     self.product_menu = elements['product_menu']
     self.project_menu = elements['project_menu']
     self.username_showspan = elements['username_showspan']
Ejemplo n.º 8
0
 def __init__(self, driver):  # 属性 ==》页面控件
     super().__init__(driver)
     # self.bug_module = {'element_name': 'BUG模块', 'locator_type': 'xpath',
     #                           'locator_value': '//li[@data-id="bug"]', 'timeout': 3}
     # self.createbug_button = {'element_name': '提BUG按钮', 'locator_type': 'xpath',
     #                           'locator_value': '//a[contains(@href,"moduleID")]', 'timeout': 3}
     # self.unclosedbug_button = {'element_name': '未关闭BUG', 'locator_type': 'xpath',
     #                      'locator_value': '//a[contains(@href,"unclosed.html")]', 'timeout': 3}
     elements = ElementdataUtils('testmenu_page').get_element_info()
     self.bug_module = elements['bug_module']
     self.createbug_button = elements['createbug_button']
     self.unclosedbug_button = elements['unclosedbug_button']
Ejemplo n.º 9
0
 def __init__(self,driver):  #属性 ==》页面控件
     super().__init__(driver)
     # self.username_inputbox = {'element_name':'用户名输入框','locator_type':'xpath',
     #                          'locator_value':'//input[@name="account"]','timeout':15}
     # self.password_inputbox = {'element_name': '密码输入框', 'locator_type': 'xpath',
     #                          'locator_value': '//input[@name="password"]', 'timeout': 5}
     # self.login_button = {'element_name': '登录按钮', 'locator_type': 'xpath',
     #                          'locator_value': '//button[@id="submit"]', 'timeout': 5}
     elements = ElementdataUtils('login_page').get_element_info()
     self.username_inputbox = elements['username_inputbox']
     self.password_inputbox = elements['password_inputbox']
     self.login_button = elements['login_button']
 def __init__(self, driver):
     super().__init__(driver)
     mainpage.goto_project()
     elements = ElementdataUtils('iteration_team_management').get_element_info()
     self.team = elements['team']
     self.click_iteration = elements['click_iteration']
     self.choose_iteration = elements['choose_iteration']
     self.team_management = elements['team_management']
     self.add_dev_member = elements['add_dev_member']
     self.choose_dev_member = elements['choose_dev_member']
     self.add_test_member = elements['add_test_member']
     self.choose_test_member = elements['choose_test_member']
     self.preservation = elements['preservation']
 def __init__(self, driver):
     super().__init__(driver)
     elements = ElementdataUtils('iteration', 'create_new_iteration_page').get_element_info()
     self.create_iteration = elements['create_iteration']
     self.iteration_name = elements['iteration_name']
     self.iteration_code = elements['iteration_code']
     self.start_date = elements['start_date']
     self.close_date = elements['close_date']
     self.team_name = elements['team_name']
     self.iteration_type = elements['iteration_type']
     self.chose_iteration_type = elements['chose_iteration_type']
     self.related_items = elements['related_items']
     self.chose_related_items = elements['chose_related_items']
     self.switch_to_content_frame = elements['switch_to_content_frame']
     self.iterative_description = elements['iterative_description']
     self.preservation = elements['preservation']
     self.close_button = elements['close_button']
Ejemplo n.º 12
0
 def __init__(self, driver):
     super().__init__(driver)
     elements = ElementdataUtils('main').get_element_info()
     # self.companyname_showbox = {'element_name':'公司名称','locator_type':'xpath',
     #                          'locator_value':'//h1[@id="companyname"]','timeout':5}
     # self.myzone_menu = {'element_name':'我的地盘','locator_type':'xpath',
     #                          'locator_value':'//li[@data-id="my"]','timeout':5}
     # self.product_menu = {'element_name':'产品菜单','locator_type':'xpath',
     #                          'locator_value':'//li[@data-id="product"]','timeout':5}
     # self.test_menu = {'element_name':'测试菜单','locator_type':'xpath',
     #                          'locator_value':'//li[@data-id="qa"]','timeout':5}
     # self.username_showspan = {'element_name':'用户名','locator_type':'xpath',
     #                          'locator_value':'//span[@class="user-name"]','timeout':5}
     self.companyname_showbox = elements['companyname_showbox']
     self.myzone_menu = elements['myzone_menu']
     self.product_menu = elements['product_menu']
     self.test_menu = elements['test_menu']
     self.username_showspan = elements['username_showspan']
     self.myzone_link = elements['myzone_link']
     self.user_menu = elements['user_menu']
     self.quit_button = elements['quit_button']
Ejemplo n.º 13
0
 def __init__(self, driver):
     super().__init__(driver)
     # self.bugtitle_inputbox = {'element_name': 'BUG标题输入框', 'locator_type': 'xpath',
     #                    'locator_value': '//input[@id="title"]', 'timeout': 3}
     # self.bugdescribe_frame= {'element_name': 'BUG描述iframe', 'locator_type': 'xpath',
     #                          'locator_value': '//iframe[@class="ke-edit-iframe"]', 'timeout': 3}
     # self.bugdescribe_inputbox = {'element_name': 'BUG描述输入框', 'locator_type': 'xpath',
     #                            'locator_value': '//body[@class="article-content"]', 'timeout': 3}
     # self.submit_button = {'element_name': 'BUG提交', 'locator_type': 'xpath',
     #                            'locator_value': '//button[@id="submit"]', 'timeout': 3}
     # self.version_chosen = {'element_name': '影响版本选择', 'locator_type': 'xpath',
     #                            'locator_value': '//div[@id="openedBuild_chosen"]', 'timeout': 3}
     # self.version = {'element_name': '影响版本', 'locator_type': 'xpath',
     #                        'locator_value': '//li[@title="主干"]', 'timeout': 3}
     elements = ElementdataUtils('createbug_page').get_element_info()
     self.bugtitle_inputbox = elements['bugtitle_inputbox']
     self.bugdescribe_frame = elements['bugdescribe_frame']
     self.submit_button = elements['submit_button']
     self.bugdescribe_inputbox = elements['bugdescribe_inputbox']
     self.version_chosen = elements['version_chosen']
     self.version = elements['version']
 def __init__(self, driver):
     super().__init__(driver)
     elements = ElementdataUtils('product',
                                 'product_page').get_element_info()
     self.story_page = elements['story_page']
     self.plan_page = elements['plan_page']
Ejemplo n.º 15
0
 def __init__(self, driver):  # 属性==》页面的控件
     super().__init__(driver)
     elements = ElementdataUtils('login', 'login_page').get_element_info()
     self.username_inputbox = elements['username_inputbox']
     self.password_inputbox = elements['password_inputbox']
     self.login_button = elements['login_button']