def test_software_delete(self): soft_number = self.soft.get_text(software_manage.loc("soft_number")) self.soft.click_software_all() self.soft.click_delete() self.soft.click_software_delete_confirm() self.soft.not_text_element(software_manage.loc("soft_number"), soft_number, "【软件删除】")
def test_more_delete(self, more): soft_number = self.soft.get_text(software_manage.loc("soft_number")) self.soft.input_search_input(more["soft_name"]) self.soft.click_more(more["loc"]) self.soft.click_delete_all() self.soft.not_text_element(software_manage.loc("soft_number"), soft_number, "文件删除【%s】" % more["upload_file"]) self.driver.refresh()
def test_more_upload(self, more): self.soft.input_search_input(more["soft_name"]) self.soft.click_more(more["loc"]) self.soft.click_more_load(more["upload_file"]) self.soft.displayed_true(software_manage.loc("upload_loc"), "上传文件【%s】" % more["upload_file"]) self.driver.refresh()
def test_message(self, massage=data("massage")): self.soft.input_search_input(massage["soft_name"]) self.soft.click_more(massage["loc"]) self.soft.click_massage() self.soft.input_massage(massage["massage"]) self.soft.click_publish_massage() self.soft.displayed_true(software_manage.loc("massage_checkout"), "【管理员留言发表】")
def test_new_software(self, param): soft_number = self.soft.get_text(software_manage.loc("soft_number")) self.soft.click_new_soft() self.soft.input_new_soft_name(param["soft_name"]) self.soft.input_new_soft_version(param["soft_version"]) self.soft.click_new_soft_classify(param["soft_classify"]) self.soft.click_soft_system(param["system_class"]) self.soft.click_new_soft_license(param["soft_license"]) self.soft.click_new_soft_load(param["load_class"]) self.soft.click_new_soft_connection(param["soft_connection"]) self.soft.click_new_soft_upload_icon(param["soft_name"]) self.soft.click_list_icon(param["soft_name"]) self.soft.click_new_soft_admin() self.soft.input_new_soft_directory(param["soft_directory"]) self.soft.input_new_soft_command(param["soft_command"]) self.soft.input_new_soft_firm(param["soft_name"]) self.soft.click_new_soft_time() self.soft.click_new_soft_units() self.soft.input_new_asset_num(param["asset_num"]) self.soft.click_confrim() self.soft.not_text_element(software_manage.loc("soft_number"), soft_number, "新建软件【%s】" % param["soft_name"])
def test_upload_file(self): soft_number = self.soft.get_text(software_manage.loc("soft_number")) self.soft.click_upload_file() self.soft.file_upload(data("upload_file"), wait=2) self.soft.not_text_element(software_manage.loc("soft_number"), soft_number, "【软件导入】")
def test_edit_software(self, soft=data("edit_software")): self.soft.click_edit_software() self.soft.click_new_soft_load(soft[1]) self.soft.click_edit_confrim() self.soft.element_number(software_manage.loc("load_class_num"), 3, "编辑软件【%s】" % soft[0])
def test_more_remark(self, more): self.soft.input_search_input(more["soft_name"]) self.soft.click_more(more["loc"]) self.soft.input_note(more["remark"]) self.soft.displayed_true(software_manage.loc("remark_loc"), "%s【保存备注】" % more["loc"]) self.driver.refresh()
def test_more_preview(self, preview): self.soft.input_search_input(preview["soft_name"]) self.soft.click_more(preview["loc"]) self.soft.click_preview() self.soft.displayed_true(software_manage.loc("preview_loc"), "%s【文件预览】" % preview["loc"]) self.driver.refresh()