1.增加Case 2.长传文件 3.修改增加关键字

This commit is contained in:
byb11
2021-01-22 00:45:29 +08:00
parent a2d57c494f
commit 6d6cc7b310
12 changed files with 334 additions and 23 deletions

View File

@@ -43,6 +43,9 @@ Settings-Search
... ELSE IF "${search}"=="Source Website" run keywords sleep 1
... AND click xpath=/html/body/div/div[1]/div[1]/ul/li[3]
... AND input xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[1]/span/div/div/div[2]/div/div[1]/div[3]/div/input ${value}
... ELSE IF "${search}"=="JA3Hash" run keywords sleep 1
... AND click xpath=/html/body/div/div[1]/div[1]/ul/li[3]
... AND input xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[1]/span/div/div/div[2]/div/div[1]/div[3]/div/input ${value}
sleep 1
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[1]/span/div/i #点击搜索按钮
sleep 1
@@ -989,6 +992,126 @@ EditSSLDecryptionExclusion
${text1} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/div/p/span #获取点击后页面文本信息
Should Be Equal As Strings ${text1} ${name} #断言
CreateSSLFingerprint
[Arguments] ${Ja3} ${Pinning} ${search} ${Description}=null
[Documentation]
... ${Ja3}:指纹信息
... ${Pinning}是否Pinning(Yes/No)
... ${search}:查询条件
... ${Description}:描述
sleep 1
click id=children6 #点击一级目录Settings
sleep 1
click id=sidebarProxy_CertificateManagement #点击二级目录Certificate Managements
sleep 2
click xpath=//*[@id="proxyTabs"]/div/ul/li[5] #点击SSL Fingerprint
sleep 1
click id=Fingerprint_create #点击Create
sleep 1
input id=authoritiesAdd_name ${Ja3}
run keyword if "${Pinning}"=="Yes" run keywords sleep 1
... AND click id=pinningStateYes
run keyword if "${Pinning}"=="No" run keywords sleep 1
... AND click id=pinningStateNo
sleep 1
run keyword if "${Description}"!="null" run keywords sleep 1
... AND input id=labels_describe ${Description}
sleep 1
click id=authoritiesAdd_sub # 点击Ok按钮
Wait Until Element Is Visible xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/div/div/span/div[2]/span 20
Settings-Search ${Ja3} ${search}
${text} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/div/div/span/div[2]/span
${text1} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[3]/div/div/div/p/span
Should Be Equal As Strings ${text} ${Ja3}
Should Be Equal As Strings ${text1} ${Pinning}
EditSSLFingerprint
[Arguments] ${ID-Ja3} ${NewJa3} ${Pinning} ${search} ${Description}=null
[Documentation]
... ${ID-Ja3}:id或JA3Hash的元素
... ${NewJa3}:指纹信息
... ${Pinning}是否Pinning(Yes/No)
... ${search}:查询条件 id 或JA3Hash
... ${Description}:描述
sleep 1
click id=sidebarProxy_CertificateManagement #点击二级目录Certificate Managements
sleep 2
click xpath=//*[@id="proxyTabs"]/div/ul/li[5] #点击SSL Fingerprint
sleep 1
Settings-Search ${ID-Ja3} ${search}
sleep 2
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr
sleep 1
click id=Fingerprint_edit
sleep 1
input id=authoritiesAdd_name ${NewJa3}
run keyword if "${Pinning}"=="Yes" run keywords sleep 1
... AND click id=pinningStateYes
run keyword if "${Pinning}"=="No" run keywords sleep 1
... AND click id=pinningStateNo
sleep 1
run keyword if "${Description}"!="null" run keywords sleep 1
... AND input id=labels_describe ${Description}
sleep 1
click id=authoritiesAdd_sub
Wait Until Element Is Visible xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/div/div/span/div[2]/span 20
run keyword if "${search}"=="id" run keywords sleep 1
... AND Settings-Search ${ID-Ja3} ${search}
run keyword if "${search}"=="JA3Hash" run keywords sleep 1
... AND Settings-Search ${NewJa3} ${search}
${text} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/div/div/span/div[2]/span
${text1} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[3]/div/div/div/p/span
Should Be Equal As Strings ${text} ${NewJa3}
Should Be Equal As Strings ${text1} ${Pinning}
SSLFingerprintImportUserAgent
[Arguments] ${ID} ${file} ${USQuantity} ${AssertionText} ${USXpath}
[Documentation]
... ${ID} :断言指纹得ID
... ${file}:上传文件路径
... ${USQuantity} :导入文件对应指纹信息US得数量
... ${AssertionText}断言得US
... ${USXpath}被断言US得xpath定位
sleep 1
click id=sidebarProxy_CertificateManagement #点击二级目录Certificate Managements
sleep 2
click xpath=//*[@id="proxyTabs"]/div/ul/li[5] #点击SSL Fingerprint
sleep 1
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[1]/span[2]/button
sleep 2
Choose File xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[4]/div/div/div[2]/div/div[1]/input ${file}
sleep 2
click id=Import_ua_Ok
sleep 5
Settings-Search ${ID} id
sleep 2
Mouse Over xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/div/div/span/div/span
sleep 3
run keyword if "${USQuantity}" >= "4" run keywords sleep 1
... AND click xpath=/html/body/div[last()]/ul/li/div[2]/span[2]/span[4]
... AND sleep 2
${text} Get Text xpath=${USXpath}
Should Be Equal As Strings ${text} ${AssertionText}
run keyword if "${USQuantity}" >= "4" run keywords sleep 1
... AND click id=useragent_cancle
... AND sleep 1
SSLFingerprintImportJA3
[Arguments] ${file}
[Documentation]
... ${file}:上传文件路径
sleep 1
click id=sidebarProxy_CertificateManagement #点击二级目录Certificate Managements
sleep 2
click xpath=//*[@id="proxyTabs"]/div/ul/li[5] #点击SSL Fingerprint
sleep 1
click id=objectImport
sleep 2
Choose File xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[1]/div[2]/div[2]/div/div[1]/div/div/div[1]/div/form/div[1]/div/div/div[1]/input ${file}
sleep 2
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[1]/div[2]/div[2]/div/div[1]/div/div/div[1]/div/form/div[2]/div/button
sleep 2
Settings_swarch_name
[Arguments] ${name}
@@ -1765,14 +1888,21 @@ Switch_IP_Libraries
OpenPages
[Arguments] ${SecondaryMenu} ${Three-levelMenu}=null
[Arguments] ${SecondaryMenu} ${Three-levelMenu} ${Targeting}=null
[Documentation]
... ${SecondaryMenu}:二级菜单
... ${Three-levelMenu}:三级菜单
... ${Targeting} :三级菜单 定位方式 默认不输入为id
click id=children6
Sleep 1
click id=${SecondaryMenu}
run keyword if "${Three-levelMenu}"!="null" run keywords sleep 1
... AND click id=${Three-levelMenu}
sleep 1
run keyword if "${Targeting}"=="null" run keywords sleep 1
... AND click id=${Three-levelMenu}
run keyword if "${Targeting}"=="xpath" run keywords sleep 1
... AND click ${Targeting}=${Three-levelMenu}
sleep 5
TurnPage
[Arguments] ${NextPage} ${PreviousPage} ${JumpInput} ${pages}
[Documentation]
@@ -1850,6 +1980,14 @@ DeleteAuthorities_del
click xpath=/html/body/div/div/div[3]/button[2]
sleep 2
DeleteSSLFingerprint
sleep 2
click id=Fingerprint_del
sleep 2
click xpath=/html/body/div/div/div[3]/button[2]
sleep 2
Policy_Verify_Switch
[Arguments] ${Protocol}
sleep 1
@@ -1917,6 +2055,19 @@ UploadFilesSize
... AND sleep 2
... AND click id=hijackAddOk1 #点击OK
... AND sleep 1
run keyword if "${Page}"=="SSLFingerprint" run keywords sleep 1
... AND click id=children6 #点击一级目录Settings
... AND Sleep 1
... AND click id=sidebarProxy_CertificateManagement #点击二级目录
... AND Sleep 2
... AND click xpath=//*[@id="proxyTabs"]/div/ul/li[5]
... AND Sleep 1
... AND click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[1]/span[2]/button
... AND sleep 1
... AND Choose File xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[4]/div/div/div[2]/div/div[1]/input ${file}
... AND sleep 2
... AND click id=Import_ua_Ok
... AND sleep 1
${text} get text xpath=/html/body/div[last()]/p
Should Be Equal As Strings ${text} ${Promptinfor}