diff --git a/01-TestCase/tsg_ui/ui_settings/IP_Libraries_Case.robot b/01-TestCase/tsg_ui/ui_settings/IP_Libraries_Case.robot index acc0738..8b27b82 100644 --- a/01-TestCase/tsg_ui/ui_settings/IP_Libraries_Case.robot +++ b/01-TestCase/tsg_ui/ui_settings/IP_Libraries_Case.robot @@ -125,7 +125,7 @@ IP_Libraries_Create_Country-014 IP_Libraries_Create_Country-015 #翻页功能以及每页的归属地条数 - Pages + OpenPages sidebarAdvanced Three-levelMenu=Advanced/ipLibrary Ui-Pages 5 IP_Libraries_Create_Country-016 diff --git a/01-TestCase/tsg_ui/ui_settings/ResponsePagesCase.robot b/01-TestCase/tsg_ui/ui_settings/ResponsePagesCase.robot index 9b6cdcd..baf9206 100644 --- a/01-TestCase/tsg_ui/ui_settings/ResponsePagesCase.robot +++ b/01-TestCase/tsg_ui/ui_settings/ResponsePagesCase.robot @@ -62,7 +62,24 @@ CreateResponsePagesSpecialFileName 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 + OpenPages sidebarProxy_Profiles + click id=respinseAdd + sleep 1 + Choose File xpath=//*[@id="policy_Manipulation_create6"]/div[2]/form/div[2]/div/div/div/input ${path}response_pages_files\\Create-ResponsePages-test.html #上传文件 + Sleep 2 + click id=responseAddOk1 + sleep 1 + ${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 + +DownloadFile + [Tags] PositiveTestCase Settings ResponsePages + CreateResponsePages Create-ResponsePagess-001 ${path}response_pages_files\\Create-ResponsePages-test.html name + DownLoadFile ${Downloadpath}Create-ResponsePages-test.htm + ResponsePageUploadNullFile [Tags] NegtivetestCase html Settings ResponsePages UploadFilesSize ResponsePages ResponsePageUploadfile ${path}response_pages_files\\null.html Please choose to upload files @@ -73,4 +90,9 @@ ResponsePageUploadExceed20MFile ResponsePagesFileTypeDoesNotMatch [Tags] NegtivetestCase html Settings ResponsePages - UploadFilesSize ResponsePages ResponsePagesFileTypeDoesNotMatch ${path}insert_files\\Create-Insert Scripts-test.css "html" and "htm" only \ No newline at end of file + UploadFilesSize ResponsePages ResponsePagesFileTypeDoesNotMatch ${path}insert_files\\Create-Insert Scripts-test.css "html" and "htm" only + +ResponsePagesDeleteReferencedData + [Tags] NegtivetestCase 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 329447b..babb318 100644 --- a/02-Keyword/tsg_ui/setting/Settings.robot +++ b/02-Keyword/tsg_ui/setting/Settings.robot @@ -1723,13 +1723,13 @@ Switch_IP_Libraries Should Be Equal As Strings ${GeoNameText} ${GeoName} #断言 -Pages - [Arguments] - click id=children6 #点击一级目录Settings +OpenPages + [Arguments] ${SecondaryMenu} ${Three-levelMenu}=null + click id=children6 Sleep 1 - click id=sidebarAdvanced - sleep 1 - click id=Advanced/ipLibrary #点击二级目录IP_Libraries + click id=${SecondaryMenu} + run keyword if "${Three-levelMenu}"!="null" run keywords sleep 1 + ... AND click id=${Three-levelMenu} sleep 1 Ui-Pages @@ -1863,4 +1863,32 @@ UploadFilesSize ... AND click id=hijackAddOk1 #点击OK ... AND sleep 1 ${text} get text xpath=/html/body/div[last()]/p - Should Be Equal As Strings ${text} ${Promptinfor} \ No newline at end of file + Should Be Equal As Strings ${text} ${Promptinfor} + +DownLoadFile + [Arguments] ${DownloadFilePath} + [Documentation] ${DownloadFilePath}:文件下载路径 + sleep 1 + click id=dowmloadi + sleep 2 + Run_Keyword_And_Continue_On_Failure File_Should_Exist ${DownloadFilePath} #出错后继续执行,如文件在指定路径存在则通过 + +DeleteReferencedData + [Arguments] ${SecondaryMenu} ${ID} ${PromptInformation} + [Documentation] + ... ${SecondaryMenu}:测试也ID + ... ${ID} :查询数据的ID + ... ${PromptInformation} :提示信息 + Sleep 1 + click id=children6 #点击一级目录Settings + Sleep 1 + click id=${SecondaryMenu} #点击二级目录Proxy Profiles + Sleep 2 + Settings-Search ${ID} id + Sleep 2 + click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr + sleep 1 + DeleteresinseDel + ${text} get text xpath=/html/body/div[last()]/p + Should Be Equal As Strings ${text} ${PromptInformation} + \ No newline at end of file diff --git a/03-Variable/BifangApiVariable.txt b/03-Variable/BifangApiVariable.txt index f9f0614..e74cbc3 100644 --- a/03-Variable/BifangApiVariable.txt +++ b/03-Variable/BifangApiVariable.txt @@ -1,35 +1,36 @@ *** Variables *** #登录类型:api | cli | ${None}(tsg mib) | 未指定,默认为ui -${loginType} api +${loginType} ui #执行环境是否Widonws -${systemType} Widonws +${systemType} api #API配置信息 -${host} 192.168.44.72 -${port} 80 +${host} 192.168.44.71 +${port} 8080 ${authmode} 1 ${authCode} ${EMPTY} ${ldapId} 27 ${version} v1 ${version2} v2 -${username} hebingning -${password} 222222 +${username} byb +${password} 111111 ${encodePassword} ${EMPTY} ${token} ${EMPTY} #[Documentation] 测试终端IP统一配置 -${testClentIP} 192.168.50.3 -${testSubscriberID} $test3 +${testClentIP} 192.168.50.57 +${testSubscriberID} $test57 #自动化标签 ${userTagIds} ${EMPTY} #Documentation] 是否添加测试终端IP到策略统一配置,0为不添加测试终端IP,1为添加测试终端IP,默认1 ${addTestClentIPFlag} 0 #测试环境是否需要把tsgui和api添加为SecurityPolicy-Allow 1为需要,默认1 , -${addTsgUIAPIFlag} 0 +${addTsgUIAPIFlag} 1 #执行需要暂停时间 #策略下发后到验证需等待时间 ${policyVerificationSleepSeconds} 20 #策略验证后到验证策略日志需等待时间 ${policyLogVerificationSleepSeconds} 60 -${path} D:/aaa +${path} C:/Users/byb11/git/tsg_autotest/05-Other/ +${Downloadpath} C:/Users/byb11/Downloads/ ${curlbatpath} ${path}/curl/ ${mailpath} ${path}/mail/ ${responsePageFiles} ${path}/response_pages_files/ @@ -64,5 +65,6 @@ ${snmpCommunity} public ${oamHost} 192.168.40.210 ${oamPort} 50080 ${contrast} 0.1 +${editpasswd} no #设置密码过期时是否需要修改密码,no为不修改,yes为修改 # Mysql数据库连接信息 ${mysqlHost} host='192.168.44.72',port=3306,user='root',passwd='bifang!@#',database='tsg-bifang' \ No newline at end of file