コード例 #1
0
 def test_list4E_run(self):
     '''进入名称链接:下载 V1.0全文报告'''
     self.user_login_verify_run("collegecheck","f")
     time.sleep(1)
     T=TaskList(self.driver)
     # 进入名称链接
     T.taskNameLink("new_V")
     # 输入篇名点击搜索
     self.driver.find_element(*self.title_input_loc).send_keys("医学期刊简介")
     # 筛选检测成功的
     Select(self.driver.find_element_by_name("State")).select_by_visible_text("检测成功")
     self.driver.find_element(*self.task_search_loc).click()
     time.sleep(2)
     # 3对应全文报告
     report_type = T.downReport("3")
     str=report_type[:2]
     str_new="+论文相似性检测报告"+"(V1.0"+str+"版).pdf"
     title = T.loadReport()
     new_title = title+str_new
     print(new_title)
     # 判断文件夹中是否存在
     flag=T.downVerify1(new_title)
     if flag == True:
         # 修改文件名称
         T.renameFileName1(new_title)
     # 点击V1.0详细版链接
     self.driver.find_element_by_xpath("html/body/div[4]/div[2]/table/tbody/tr[2]/td[9]/a[5]").click()
     time.sleep(3)
     # 判断下载位置
     flag1 = T.downVerify1(new_title)
     self.assertTrue(flag1)
     imagetest = getResultImage()
     imagetest.insert_image(self.driver,"full_report_V1.0.jpg")
コード例 #2
0
 def test_list3A_run(self):
     '''进入名称链接:篇名链接-上传论文可以点击下载到本地'''
     self.user_login_verify_run("collegecheck","f")
     time.sleep(1)
     T=TaskList(self.driver)
     # 进入名称链接
     T.taskNameLink("ncy")
     # 输入篇名点击搜索
     T.title_search("医学期刊")
     new_title = T.paperNameLink()
     # print(new_title)
     flag=T.downVerify1(new_title)
     if flag == True:
         # 修改文件名称
         T.renameFileName1(new_title)
     # 勾选复选框,点击下载按钮
     T.downloadReport()
     # 点击弹出框的“确定按钮”
     self.driver.find_element_by_xpath(".//*[@id='confirmDownload']").click()
     time.sleep(3)
     # 判断下载位置
     flag1=T.downVerify1(new_title)
     self.assertTrue(flag1)
     imagetest = getResultImage()
     imagetest.insert_image(self.driver,"click_name_link.jpg")