diff --git a/01-TestCase/tsg_ui/ui_settings/ResponsePagesCase.robot b/01-TestCase/tsg_ui/ui_settings/ResponsePagesCase.robot index d072512..f2883f1 100644 --- a/01-TestCase/tsg_ui/ui_settings/ResponsePagesCase.robot +++ b/01-TestCase/tsg_ui/ui_settings/ResponsePagesCase.robot @@ -5,66 +5,79 @@ Library OperatingSystem Resource ../../../02-Keyword/tsg_ui/setting/Settings.robot *** Test Cases *** -CreateResponsePagesTypeHtml - [Tags] PositiveTestCase html Settings ResponsePage +ResponsePagesCreateHtmlfile + [Tags] Positive UI html Settings ResponsePage CreateResponsePages CreateResponsePagesTypeHtml ${path}response_pages_files\\Create-ResponsePages-test.html name click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span DeleteresinseDel -CreateResponsePagesTypeHtm - [Tags] PositiveTestCase htm Settings ResponsePage +ResponsePagesCreateHtmfile + [Tags] Positive UI htm Settings ResponsePage CreateResponsePages CreateResponsePagesTypeHtm ${path}response_pages_files\\Create-Response_Pages-test-2.htm name click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span DeleteresinseDel + +ResponsePagesEditSearchID + [Tags] Positive UI htm Settings ResponsePages + CreateResponsePages Create-ResponsePagess-001 ${path}response_pages_files\\Create-ResponsePages-test.html name + ${id} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/span + Edit-Response-Pages ${id} lyf-Edit-test-001 ${path}response_pages_files\\Create-ResponsePages-test-1.html id + DownLoadFile ${path}response_pages_files\\Create-ResponsePages-test-1.html ${Downloadpath}Create-ResponsePages-test-1.html + click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span + DeleteresinseDel + +ResponsePagesEditSearchName + [Tags] Positive UI Name Settings ResponsePages + CreateResponsePages Create-ResponsePagess-001 ${path}response_pages_files\\Create-ResponsePages-test.html name + ${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span + Edit-Response-Pages ${name} lyf-Edit-test-007 ${path}response_pages_files\\Create-ResponsePages-test-1.html name + DownLoadFile ${path}response_pages_files\\Create-ResponsePages-test-1.html ${Downloadpath}Create-ResponsePages-test-1.html + click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span + DeleteresinseDel -CreateResponsePagesNameMinSize - [Tags] PositiveTestCase htm Settings ResponsePage +ResponsePagesNameMinSize + [Tags] Boundary UI Name Settings ResponsePage CreateResponsePages 1 ${path}response_pages_files\\Create-Response_Pages-test-2.htm name click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span DeleteresinseDel - -CreateResponsePagesNameMaxSize - [Tags] PositiveTestCase htm Settings ResponsePages + +ResponsePagesCreateNameMaxSize + [Tags] Boundary UI Name Settings ResponsePages CreateResponsePages CreateResponsePagesNameMaxSizeCreateResponsePagesNameMaxSizeCreateResponsePagesNameMaxSizeCreateResponsePagesNameMaxSizeCreateRe ${path}response_pages_files\\Create-Response_Pages-test-2.htm name click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span DeleteresinseDel - -CreateResponsePagesNameSpecialChar - [Tags] PositiveTestCase htm Settings ResponsePages + +ResponsePagesCreateNameSpecialChar + [Tags] Boundary UI Name Settings ResponsePages CreateResponsePages 中文+absc+моряков+@#¥%……&* ${path}response_pages_files\\Create-ResponsePages-test.html name click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span DeleteresinseDel -EditResponsePagesSearchID - [Tags] PositiveTestCase htm Settings ResponsePages - CreateResponsePages Create-ResponsePagess-001 ${path}response_pages_files\\Create-ResponsePages-test.html name - ${id} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/span - Edit-Response-Pages ${id} lyf-Edit-test-001 ${path}response_pages_files\\Create-ResponsePages-test-1.html id - click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span - DeleteresinseDel - -EditResponsePagesSearchName - [Tags] PositiveTestCase htm Settings ResponsePages - CreateResponsePages Create-ResponsePagess-001 ${path}response_pages_files\\Create-ResponsePages-test.html name - ${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span - Edit-Response-Pages ${name} lyf-Edit-test-007 ${path}response_pages_files\\Create-ResponsePages-test-1.html name - click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span - DeleteresinseDel - ResponsePageUpload20MFile - [Tags] PositiveTestCase html Settings ResponsePages + [Tags] Boundary UI File Settings ResponsePages CreateResponsePages ResponsePageUpload20MFile ${path}response_pages_files\\20MFile.html name click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span DeleteresinseDel -CreateResponsePagesSpecialFileName - [Tags] PositiveTestCase html Settings ResponsePages +ResponsePagesSpecialFileName + [Tags] Boundary UI File Settings ResponsePages CreateResponsePages CreateResponsePagesSpecialFileName ${path}response_pages_files\\ВставкаСкриптов!@#$%^&(-+=‘;。,?.html name click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span DeleteresinseDel -CreateResponsePagesNullFileName - [Tags] PositiveTestCase html Settings ResponsePages +ResponsePagesDownloadFile + [Tags] Positive UI Settings ResponsePages + CreateResponsePages Create-ResponsePagess-001 ${path}response_pages_files\\Create-ResponsePages-test.html name + DownLoadFile ${path}response_pages_files\\Create-ResponsePages-test.html ${Downloadpath}Create-ResponsePages-test.html + DeleteresinseDel + +ResponsePagesTurnPage + [Tags] Positive UI Settings ResponsePages + OpenPages sidebarProxy_Profiles + Ui-Pages //*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[5]/div/button[2] //*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[5]/div/button[1] //*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[5]/div/span[2]/div/input 2 + +ResponsePagesCreateNullName + [Tags] Negtive UI Name Settings ResponsePages OpenPages sidebarProxy_Profiles click id=respinseAdd sleep 1 @@ -75,24 +88,20 @@ CreateResponsePagesNullFileName ${text} get text xpath=//*[@id="policy_Manipulation_create6"]/div[2]/form/div[1]/div/div[3] Should Be Equal As Strings ${text} Please enter the content -ResponsePagesDownloadFile - [Tags] PositiveTestCase Settings ResponsePages - CreateResponsePages Create-ResponsePagess-001 ${path}response_pages_files\\Create-ResponsePages-test.html name - DownLoadFile ${Downloadpath}Create-ResponsePages-test.html - ResponsePageUploadNullFile - [Tags] NegtivetestCase html Settings ResponsePages + [Tags] Negtive UI File Settings ResponsePages UploadFilesSize ResponsePages ResponsePageUploadfile ${path}response_pages_files\\null.html Please choose to upload files ResponsePageUploadExceed20MFile - [Tags] NegtivetestCase html Settings ResponsePages + [Tags] Negtive UI File Settings ResponsePages UploadFilesSize ResponsePages ResponsePageUploadExceed20MFile ${path}response_pages_files\\Exceed20MFile.html File Maximum Limitation 20MB ResponsePagesFileTypeDoesNotMatch - [Tags] NegtivetestCase html Settings ResponsePages + [Tags] Negtive UI File Settings ResponsePages UploadFilesSize ResponsePages ResponsePagesFileTypeDoesNotMatch ${path}insert_files\\Create-Insert Scripts-test.css "html" and "htm" only ResponsePagesDeleteReferencedData - [Tags] NegtivetestCase Settings ResponsePages + [Tags] Negtive UI Settings ResponsePages DeleteReferencedData sidebarProxy_Profiles 527 The referenced data are not allowed to disable or delete + diff --git a/02-Keyword/tsg_ui/setting/Settings.robot b/02-Keyword/tsg_ui/setting/Settings.robot index 2228c07..95c7ccc 100644 --- a/02-Keyword/tsg_ui/setting/Settings.robot +++ b/02-Keyword/tsg_ui/setting/Settings.robot @@ -1,6 +1,6 @@ *** Settings *** Library Selenium2Library - +Library ../../../04-CustomLibrary/Custometest/Common.py *** Keywords *** click [Arguments] ${element} @@ -1730,20 +1730,34 @@ OpenPages click id=${SecondaryMenu} run keyword if "${Three-levelMenu}"!="null" run keywords sleep 1 ... AND click id=${Three-levelMenu} - sleep 1 + sleep 5 Ui-Pages - [Arguments] ${pages} - click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[4]/div/ul/li[2] + [Arguments] ${NextPage} ${PreviousPage} ${JumpInput} ${pages} + [Documentation] + ... ${NextPage} 下一页按钮定位 + ... ${PreviousPage} 上一页按钮定位 + ... ${JumpInput} 跳转页面输入框 + ... ${pages} 跳转得页码 + click xpath=${NextPage} + sleep 2 + ${text1} Get Element Attribute xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[5]/div/ul/li[2] class + sleep 1 + Should Be Equal As Strings ${text1} number active + click xpath=${PreviousPage} sleep 2 - click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[4]/div/button[2] + ${text2} Get Element Attribute xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[5]/div/ul/li[1] class + sleep 1 + Should Be Equal As Strings ${text1} number active + Clear Element Text xpath=${JumpInput} sleep 2 - Clear Element Text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[4]/div/span[2]/div/input + input text xpath=${JumpInput} ${pages} sleep 2 - input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[4]/div/span[2]/div/input ${pages} - sleep 2 - press keys xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[4]/div/span[2]/div/input ENTER + press keys xpath=${JumpInput} ENTER sleep 2 + ${text1} Get Element Attribute xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[5]/div/ul/li[${pages}] class + sleep 1 + Should Be Equal As Strings ${text1} number active ALL [Arguments] @@ -1866,12 +1880,20 @@ UploadFilesSize Should Be Equal As Strings ${text} ${Promptinfor} DownLoadFile - [Arguments] ${DownloadFilePath} - [Documentation] ${DownloadFilePath}:文件下载路径 + [Arguments] ${UploadFilePath} ${DownloadFilePath} + [Documentation] + ... ${UploadFilePath}:上传文件路径 + ... ${DownloadFilePath}:文件下载路径 sleep 1 click id=dowmloadi sleep 3 - Run_Keyword_And_Continue_On_Failure File_Should_Exist ${DownloadFilePath} #出错后继续执行,如文件在指定路径存在则通过 + ${a} get_md5_01 ${UploadFilePath} + sleep 1 + ${b} get_md5_01 ${DownloadFilePath} + sleep 1 + Should Be Equal As Strings ${a} ${b} + sleep 2 + #Run_Keyword_And_Continue_On_Failure File_Should_Exist ${DownloadFilePath} #出错后继续执行,如文件在指定路径存在则通过 DeleteReferencedData [Arguments] ${SecondaryMenu} ${ID} ${PromptInformation}