1.修改关键字 2. 修改增加Case

This commit is contained in:
byb11
2021-01-29 11:16:12 +08:00
parent ddae7823f7
commit d8c9ecd560
8 changed files with 312 additions and 220 deletions

View File

@@ -56,6 +56,12 @@ Settings-Search
... ELSE IF "${search}"=="City" run keywords sleep 1
... AND click xpath=/html/body/div/div[1]/div[1]/ul/li[4]
... 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}"=="ip" run keywords sleep 1
... AND click xpath=/html/body/div/div[1]/div[1]/ul/li[4]
... 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}"=="port" run keywords sleep 1
... AND click xpath=/html/body/div/div[1]/div[1]/ul/li[5]
... 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
@@ -618,7 +624,7 @@ CreateResponsePages
Choose File xpath=//*[@id="policy_Manipulation_create6"]/div[2]/form/div[2]/div/div/div/input ${file} #上传文件
Sleep 2
click id=responseAddOk1 #点击OK缇交
Sleep 2
Wait Until Element Is Visible xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span 30
Settings-Search ${name} ${search} #搜索框的关键字
Sleep 1
${text1} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span #获取点击后页面文本信息
@@ -915,9 +921,9 @@ CreateSSLDecryptionExclusion
input id=sslAdd_itemDesc ${value} #输入内容
Sleep 2
click id=ssl_ok #点击OK缇交
Sleep 1
Wait Until Element Is Visible xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/div/p/span 30
Settings-Search ${name1} ${search}
Sleep 1
sleep 1
${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} #断言
@@ -1404,7 +1410,7 @@ Min_max_version
... ELSE log 错误
sleep 2
click id=decryption-ok
sleep 2
Wait Until Element Is Visible 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 20
Settings-Search ${name} ${search} #搜索框的关键字
sleep 2
${name1} get text 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
@@ -1433,7 +1439,7 @@ EditDecryptionProfile
click id=profilesTabs_Profile_DecryptionProfile #点击Decryption Profile
Sleep 1
Settings-Search ${id-name} ${search} #搜索框的关键字
sleep 1
Wait Until Element Is Visible 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 20
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 #点击搜索列表
Sleep 1
click id=insertEdit #点击Edit
@@ -1494,7 +1500,7 @@ EditDecryptionProfile
... AND click id=pro_max0
... ELSE log 错误
click id=decryption-ok
Wait Until Element Is Visible id=profilesTabs_Profile_DecryptionProfile 20
Wait Until Element Is Visible id=profilesTabs_Profile_DecryptionProfile 30
Settings-Search ${id-name} ${search} #搜索框的关键字
${name1} get text 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
Should Be Equal As Strings ${name1} ${name}
@@ -1939,22 +1945,32 @@ CreateIpLibrariesErrorVerification
Should Be Equal As Strings ${text} ${AssertText}
SystemUsagePolicyVerification
[Arguments] ${type}
[Arguments] ${type} ${DisabledOREnabled}
[Documentation]
... ${type}:查询的字段 格式:(Proxy/Security/WANNAT/ProxyTCPOptions)_(Disabled/Enabled)
Sleep 1
click id=children6 #点击一级目录Settings
Sleep 1
click id=sidebarAdvanced #点击二级目录Advanced
Sleep 2
click id=Advanced/storageQuota #点击System Usage
Sleep 2
Sleep 1
${text1}= SystemUsageChart ${type}
sleep 1
click id=Advanced/storageQuota
sleep 1
${text2}= SystemUsageText ${type}
${text3}= SystemUsagePolicySQLVerification ${type} ${DisabledOREnabled}
Should Be Equal As Strings ${text1} ${text2}
Should Be Equal As Strings ${text2} ${text3}
SystemUsageObjectsVerification
[Arguments] ${type}
[Documentation]
... ${type}:查询的字段 格式:(Proxy/Security/WANNAT/ProxyTCPOptions)_(Disabled/Enabled)
click id=Advanced/storageQuota #点击System Usage
Sleep 1
${text1}= SystemUsageChart ${type}
click id=Advanced/storageQuota
sleep 1
${text2}= SystemUsageText ${type}
${text3}= SystemUsageObjectsSQLVerification ${type}
Should Be Equal As Strings ${text1} ${text2}
Should Be Equal As Strings ${text2} ${text3}
SystemUsageChart
[Arguments] ${type}
@@ -1965,7 +1981,7 @@ SystemUsageChart
... "${type}"=="Accounts_Items" or "${type}"=="Accounts_Objects" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[2]/div[1]
... "${type}"=="FQDNs_Items" or "${type}"=="FQDNs_Objects" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[2]/div[2]
... "${type}"=="HTTPSignatures_Items" or "${type}"=="HTTPSignatures_Objects" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[2]/div[3] #定位不到
... "${type}"=="Keywords_Items" or "${type}"=="Keywords_Objects" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[2]/div[3]
... "${type}"=="Keywords_Items" or "${type}"=="Keywords_Objects" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[2]/div[4]
... "${type}"=="SubscriberIDs_Items" or "${type}"=="SubscriberIDs_Objects" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[2]/div[5] #定位不到4、5、6URL
... "${type}"=="URLs_Items" or "${type}"=="URLs_Objects" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[2]/div[6]
... "${type}"=="IPAddresses_IPV4_Items" or "${type}"=="IPAddresses_IPV6_Items" or "${type}"=="IPAddresses_IP_Objects" or "${type}"=="IPAddresses_Geography_Items" or "${type}"=="IPAddresses_Geography_Objects" or "${type}"=="IPAddresses_IPLearning_Items(IPv4)" or "${type}"=="IPAddresses_IPLearning_Objects" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[2]/div[7]
@@ -2000,14 +2016,7 @@ SystemUsageText
SystemUsagePolicySQLVerification
[Arguments] ${type} ${DisabledOREnabled}
Sleep 1
click id=children6 #点击一级目录Settings
Sleep 1
click id=sidebarAdvanced #点击二级目录Advanced
Sleep 2
click id=Advanced/storageQuota #点击System Usage
Sleep 1
${text1}= SystemUsageText ${type}
sleep 1
${DisabledOREnabled} Set Variable if "${DisabledOREnabled}"=="Disabled" 0 1
${SQL} Set Variable if "${type}"=="Proxy_Disabled" or "${type}"=="Proxy_Enabled" pxy_ctrl_compile
@@ -2015,27 +2024,18 @@ SystemUsagePolicySQLVerification
... "${type}"=="WANNAT_Disabled" or "${type}"=="WANNAT_Enabled" wannat_compile
... "${type}"=="ProxyTCPOptions_Disabled" or "${type}"=="ProxyTCPOptions_Enabled" pxy_tcp_option_compile
Connect To Database Using Custom Params pymysql ${mysqlHost}
${text2} query SELECT count(*) FROM ${SQL} WHERE is_initialize !=1 And is_valid=${DisabledOREnabled}
${text2} Set Variable ${text2[0][0]}
${text1} query SELECT count(*) FROM ${SQL} WHERE is_initialize !=1 And is_valid=${DisabledOREnabled}
${text1} Set Variable ${text1[0][0]}
Disconnect From Database
${a} Set Variable ${1}
${text3} Evaluate ${text2}+${a}
${text2} Set Variable if "${type}"=="Security_Enabled" or "${type}"=="ProxyTCPOptions_Enabled" ${text3} ${text2}
Should Be Equal As Strings ${text1} ${text2}
${text2} Evaluate ${text1}+${a}
${text1} Set Variable if "${type}"=="Security_Enabled" or "${type}"=="ProxyTCPOptions_Enabled" ${text2} ${text1}
[Return] ${text1}
SystemUsageObjectsSQLVerification
[Arguments] ${type}
[Documentation]
... ${type}:验证的类型
Sleep 1
click id=children6 #点击一级目录Settings
Sleep 1
click id=sidebarAdvanced #点击二级目录Advanced
Sleep 2
click id=Advanced/storageQuota #点击System Usage
Sleep 1
${text1}= SystemUsageText ${type}
sleep 1
${SQL} Set Variable if "${type}"=="Accounts_Items" select count(*) from tsg_obj_account where is_initialize !=1
... "${type}"=="Accounts_Objects" select count(*) from policy_object where group_type='account' and is_initialize !=1
... "${type}"=="FQDNs_Items" SELECT count(*) from tsg_obj_fqdn where is_initialize !=1 and group_id !=1
@@ -2061,10 +2061,10 @@ SystemUsageObjectsSQLVerification
... "${type}"=="Applications_Groups_Items" select count(*) from tsg_obj_app_id where is_initialize !=1 and is_valid != 1
... "${type}"=="Applications_Selectors_Objects" or "${type}"=="Applications_Selectors_Items" select count(*) from app_selector_compile
Connect To Database Using Custom Params pymysql ${mysqlHost}
${text2} query ${SQL}
${text2} Set Variable ${text2[0][0]}
${text} query ${SQL}
${text} Set Variable ${text[0][0]}
Disconnect From Database
Should Be Equal As Strings ${text1} ${text2}
[Return] ${text}
SystemUsageGetText
[Arguments] ${type}
@@ -2119,12 +2119,7 @@ CreatePacketCapture
... ${ServerIP}:服务器 IP 默认为空
... ${ServerPort}:服务器端口 默认为空
Sleep 1
click id=children6 #点击一级目录Settings
Sleep 1
click id=sidebarTrouble_shooting #点击二级目录Trouble Shooting
Sleep 2
click id=Proxy_Profiles_Profile_Insert #点击PacketCapture
Sleep 1
OpenPages sidebarTrouble_shooting Proxy_Profiles_Profile_Insert
click id=packet_create
sleep 2
input id=PacketCaptureadd_name ${name}
@@ -2234,8 +2229,6 @@ EditPacketCapture
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[4]/div/div/div/p/span
Should Be Equal As Strings ${text} ${name}
PacketCaptureEffectiveDevices
[Arguments] ${EffectiveDevices}
click id=PacketCaptureadd_EDevice
@@ -2279,6 +2272,23 @@ PacketCaptureEffectiveDevices
sleep 1
click id=proxyManipulationConditionsAreaSuccess
sleep 1
PacketCaptureSerch
[Arguments] ${status}
sleep 1
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[1]/span/div/div/div[2]/div/div/div[1]/input #点击搜索框
sleep 1
click xpath=/html/body/div/div[1]/div[1]/ul/li[6]
sleep 1
run keyword if "${status}"=="Effective" run keywords sleep 1
... AND click xpath=/html/body/div/div[1]/div[1]/ul/li[1]/span
... ELSE IF "${status}"=="Invalid" run keywords sleep 1
... AND click xpath=/html/body/div/div[1]/div[1]/ul/li[2]/span
sleep 1
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[1]/span/div/i
Switch_Geographic_Locations
[Arguments] ${Continent/Country}
@@ -2350,7 +2360,6 @@ Switch_IP_Libraries
sleep 2
Should Be Equal As Strings ${GeoNameText} ${GeoName} #断言
OpenPages
[Arguments] ${SecondaryMenu} ${Three-levelMenu} ${Targeting}=null
[Documentation]
@@ -2365,7 +2374,7 @@ OpenPages
... AND click id=${Three-levelMenu}
run keyword if "${Targeting}"=="xpath" run keywords sleep 1
... AND click ${Targeting}=${Three-levelMenu}
sleep 5
sleep 2
TurnPage
[Arguments] ${NextPage} ${PreviousPage} ${JumpInput} ${pages}
@@ -2456,7 +2465,7 @@ DeletePacketCapture
click id=packet_del
sleep 2
click xpath=/html/body/div/div/div[3]/button[2]
sleep 3
Wait Until Element Is Visible xpath=/html/body/div[last()]/p 20
Policy_Verify_Switch
[Arguments] ${Protocol}
@@ -2484,6 +2493,8 @@ UploadFilesSize
... AND Sleep 2
... AND Choose File xpath=//*[@id="policy_Manipulation_create6"]/div[2]/form/div[2]/div/div/div/input ${file} #上传文件
... AND sleep 1
... AND click id=responseAddOk1
... AND sleep 1
run keyword if "${Page}"=="InsertScripts" run keywords sleep 1
... AND click id=children6 #点击一级目录Settings
... AND Sleep 1
@@ -2516,6 +2527,12 @@ UploadFilesSize
... AND Sleep 2
... AND Choose File xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[2]/div/div/div[1]/input ${file} #上传文件
... AND sleep 1
... AND click id=hijackAddContentType #点击+ 打开侧滑窗口
... AND Sleep 1
... AND click id=text/html0
... AND sleep 1
... AND click id=hijackAddOk1
... AND sleep 1
run keyword if "${Page}"=="SSLFingerprint" run keywords sleep 1
... AND click id=children6 #点击一级目录Settings
... AND Sleep 1