1.新增Case,修改用例命名规则 2. 修改关键字

This commit is contained in:
byb11
2021-01-20 09:36:54 +08:00
parent d80da19959
commit c0a15c8c0b
6 changed files with 743 additions and 273 deletions

View File

@@ -487,6 +487,30 @@ CreateInsertScripts
#//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span #获取点击后页面文本信息
Should Be Equal As Strings ${text1} ${name} #断言
TrafficMirrorProfilesValidationError
[Arguments] ${name} ${type} ${shuru} ${PromptInformation}
Sleep 1
click id=children6 #点击一级目录Settings
Sleep 1
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
Sleep 2
click id=profilesTabs_Profile_TrafficMirrorProfiles #点击Traffic Mirror Profiles按钮
Sleep 1
click id=trafficMirrorAdd #点击Create
Sleep 2
input id=trafficmirror_profileName ${name} #输入name
Sleep 2
click id=addrTypeChoose #点击下拉框
Sleep 2
click ${type} #选择vlan或者mac
Sleep 1
input id=trafficmirror_addrArray0 ${shuru}
sleep 2
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/button[1] #点击OK
Sleep 2
${text1} Get Text xpath=/html/body/div[last()]/p #获取点击后页面提示信息
Should Be Equal As Strings ${text1} ${PromptInformation} #断言
CreateTrafficMirrorProfiles
[Arguments] ${name} ${type} ${shuru} ${search}
Sleep 1
@@ -513,6 +537,7 @@ CreateTrafficMirrorProfiles
${text1} Get Text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[2]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span #获取点击后页面文本信息
Should Be Equal As Strings ${text1} ${name} #断言
EditInsertScripts
[Arguments] ${id-name} ${name1} ${file} ${type} ${search} ${jstype}=Before Page Load
[Documentation] 引用关键字,填入必填参数
@@ -1113,14 +1138,14 @@ Min_max_version
... AND click id=pro_max0
... ELSE log 错误
CreateDecryptionProfile
CreateDecryptionProfile
[Arguments] ${name} ${search} ${dict1}=null ${fail1}=null ${min1}=null ${max1}=null
Sleep 1
click id=children6 #点击一级目录Settings
Sleep 1
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
sleep 2
click id=profilesTabs_Profile_DecryptionProfile #点击Decryption Profile
click id=profilesTabs_Profile_DecryptionProfile #点击Decryption Profile
Sleep 1
click id=insertAdd #点击Create
Sleep 1
@@ -1732,7 +1757,7 @@ OpenPages
... AND click id=${Three-levelMenu}
sleep 5
Ui-Pages
TurnPage
[Arguments] ${NextPage} ${PreviousPage} ${JumpInput} ${pages}
[Documentation]
... ${NextPage} 下一页按钮定位
@@ -1741,12 +1766,12 @@ Ui-Pages
... ${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
${text1} Get Element Attribute xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[last()]/div/ul/li[2] class
sleep 1
Should Be Equal As Strings ${text1} number active
click xpath=${PreviousPage}
sleep 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
${text2} Get Element Attribute xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[last()]/div/ul/li[1] class
sleep 1
Should Be Equal As Strings ${text1} number active
Clear Element Text xpath=${JumpInput}
@@ -1755,7 +1780,7 @@ Ui-Pages
sleep 2
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
${text1} Get Element Attribute xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[last()]/div/ul/li[${pages}] class
sleep 1
Should Be Equal As Strings ${text1} number active
@@ -1896,21 +1921,52 @@ DownLoadFile
#Run_Keyword_And_Continue_On_Failure File_Should_Exist ${DownloadFilePath} #出错后继续执行,如文件在指定路径存在则通过
DeleteReferencedData
[Arguments] ${SecondaryMenu} ${ID} ${PromptInformation}
[Documentation]
... ${SecondaryMenu}:测试也ID
[Arguments] ${Page} ${SecondaryMenu} ${ID} ${PromptInformation} ${Three-level menu}=null
[Documentation]
... ${Page}:当前页面
... ${SecondaryMenu}:二级目录
... ${ID} 查询数据的ID
... ${PromptInformation} :提示信息
... ${Three-levelMenu}:三级菜单
Sleep 1
click id=children6 #点击一级目录Settings
Sleep 1
click id=${SecondaryMenu} #点击二级目录Proxy Profiles
Sleep 2
run keyword if "${Three-levelMenu}"!="null" run keywords sleep 1
... AND click id=${Three-levelMenu}
sleep 1
Settings-Search ${ID} id
Sleep 2
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr
sleep 1
DeleteresinseDel
run keyword if "${Page}"=="ResponsePage" run keywords sleep 1
... AND click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr
... AND sleep 1
... AND DeleteresinseDel
run keyword if "${Page}"=="InsertScript" run keywords sleep 1
... AND click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr
... AND sleep 1
... AND Delete
run keyword if "${Page}"=="HijackFile" run keywords sleep 1
... AND click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/span
... AND sleep 1
... AND DeletehijackDel
run keyword if "${Page}"=="TrafficMirrorProfile" run keywords sleep 1
... AND click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[2]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
... AND sleep 1
... AND DeletetrafficMirrorDel
run keyword if "${Page}"=="DecryptionProfile" run keywords sleep 1
... AND click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span
... AND sleep 1
... AND Delete
${text} get text xpath=/html/body/div[last()]/p
Should Be Equal As Strings ${text} ${PromptInformation}
test
[Arguments] ${list}
Create list ${p}
FOR ${i} IN @{list}
${p} Set Variable ${i}
END
log many @{p}