diff --git a/01-TestCase/tsg_ui/ui_settings/SystemUsageCase.robot b/01-TestCase/tsg_ui/ui_settings/SystemUsageCase.robot index 5a6c24c..6531ab8 100644 --- a/01-TestCase/tsg_ui/ui_settings/SystemUsageCase.robot +++ b/01-TestCase/tsg_ui/ui_settings/SystemUsageCase.robot @@ -3,8 +3,6 @@ Force Tags tsg-ui settings VPN Accounts Resource ../../../03-Variable/bifangapivariable.txt Resource ../../../02-Keyword/tsg_ui/setting/Settings.robot Library OperatingSystem -Library String -Library Collections *** Test Cases *** SystemUsageProxyDisabled diff --git a/02-Keyword/tsg_ui/setting/Settings.robot b/02-Keyword/tsg_ui/setting/Settings.robot index aabdd38..36b1f5d 100644 --- a/02-Keyword/tsg_ui/setting/Settings.robot +++ b/02-Keyword/tsg_ui/setting/Settings.robot @@ -1950,7 +1950,6 @@ SystemUsagePolicyVerification click id=Advanced/storageQuota #点击System Usage Sleep 2 ${text1}= SystemUsageChart ${type} - click id=Advanced/ipLibrary sleep 1 click id=Advanced/storageQuota sleep 1 @@ -1971,41 +1970,10 @@ SystemUsageChart ... "${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] ... "${type}"=="Applications_Items" or "${type}"=="Applications_Objects" or "${type}"=="Applications_Groups_Objects" or "${type}"=="Applications_Groups_Items" or "${type}"=="Applications_Selectors_Objects" or "${type}"=="Applications_Selectors_Items" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[2]/div[8] - ${ChartValueXpath} Set Variable if "${type}"=="Proxy_Disabled" /html/body/div[2]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span #为图上获取Value定位变量赋值 - ... "${type}"=="Proxy_Enabled" /html/body/div[2]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span - ... "${type}"=="Security_Disabled" /html/body/div[2]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span - ... "${type}"=="Security_Enabled" /html/body/div[2]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span - ... "${type}"=="WANNAT_Disabled" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span - ... "${type}"=="WANNAT_Enabled" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span - ... "${type}"=="ProxyTCPOptions_Disabled" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span - ... "${type}"=="ProxyTCPOptions_Enabled" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span - ... "${type}"=="Accounts_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span - ... "${type}"=="Accounts_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span - ... "${type}"=="FQDNs_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span - ... "${type}"=="FQDNs_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span - ... "${type}"=="HTTPSignatures_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span - ... "${type}"=="HTTPSignatures_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span - ... "${type}"=="Keywords_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span - ... "${type}"=="Keywords_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span - ... "${type}"=="SubscriberIDs_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span - ... "${type}"=="SubscriberIDs_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span - ... "${type}"=="URLs_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span - ... "${type}"=="URLs_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span - ... "${type}"=="IPAddresses_IPV4_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[3]/td[2]/div/span - ... "${type}"=="IPAddresses_IPV6_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[4]/td[2]/div/span - ... "${type}"=="IPAddresses_IP_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span - ... "${type}"=="IPAddresses_Geography_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[7]/td[2]/div/span - ... "${type}"=="IPAddresses_Geography_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[6]/td[2]/div/span - ... "${type}"=="IPAddresses_IPLearning_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[9]/td[2]/div/span - ... "${type}"=="IPAddresses_IPLearning_Items(IPv4)" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[10]/td[2]/div/span - ... "${type}"=="Applications_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span - ... "${type}"=="Applications_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[3]/td[2]/div/span - ... "${type}"=="Applications_Groups_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[5]/td[2]/div/span - ... "${type}"=="Applications_Groups_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[6]/td[2]/div/span - ... "${type}"=="Applications_Selectors_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[8]/td[2]/div/span - ... "${type}"=="Applications_Selectors_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[9]/td[2]/div/span + sleep 1 + ${ChartValueXpath}= SystemUsageGetText ${type} Mouse Over xpath=${ChartSuspension} - sleep 2 + sleep 1 ${text1} get text xpath=${ChartValueXpath} #获取图表上的值 [Return] ${text1} @@ -2023,48 +1991,15 @@ SystemUsageText ... "${type}"=="URLs_Items" or "${type}"=="URLs_Objects" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[3]/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[3]/div[7] ... "${type}"=="Applications_Items" or "${type}"=="Applications_Objects" or "${type}"=="Applications_Groups_Objects" or "${type}"=="Applications_Groups_Items" or "${type}"=="Applications_Selectors_Objects" or "${type}"=="Applications_Selectors_Items" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[3]/div[8] - ${TextValueXpath} Set Variable if "${type}"=="Proxy_Disabled" /html/body/div[2]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span #在文本统计获取Value定位变量赋值 - ... "${type}"=="Proxy_Enabled" /html/body/div[2]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span - ... "${type}"=="Security_Disabled" /html/body/div[2]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span - ... "${type}"=="Security_Enabled" /html/body/div[2]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span - ... "${type}"=="WANNAT_Disabled" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span - ... "${type}"=="WANNAT_Enabled" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span - ... "${type}"=="ProxyTCPOptions_Disabled" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span - ... "${type}"=="ProxyTCPOptions_Enabled" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span - ... "${type}"=="Accounts_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span - ... "${type}"=="Accounts_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span - ... "${type}"=="FQDNs_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span - ... "${type}"=="FQDNs_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span - ... "${type}"=="HTTPSignatures_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span - ... "${type}"=="HTTPSignatures_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span - ... "${type}"=="Keywords_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span - ... "${type}"=="Keywords_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span - ... "${type}"=="SubscriberIDs_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span - ... "${type}"=="SubscriberIDs_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span - ... "${type}"=="URLs_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span - ... "${type}"=="URLs_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span - ... "${type}"=="IPAddresses_IPV4_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[3]/td[2]/div/span - ... "${type}"=="IPAddresses_IPV6_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[4]/td[2]/div/span - ... "${type}"=="IPAddresses_IP_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span - ... "${type}"=="IPAddresses_Geography_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[7]/td[2]/div/span - ... "${type}"=="IPAddresses_Geography_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[6]/td[2]/div/span - ... "${type}"=="IPAddresses_IPLearning_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[9]/td[2]/div/span - ... "${type}"=="IPAddresses_IPLearning_Items(IPv4)" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[10]/td[2]/div/span - ... "${type}"=="Applications_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span - ... "${type}"=="Applications_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[3]/td[2]/div/span - ... "${type}"=="Applications_Groups_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[5]/td[2]/div/span - ... "${type}"=="Applications_Groups_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[6]/td[2]/div/span - ... "${type}"=="Applications_Selectors_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[8]/td[2]/div/span - ... "${type}"=="Applications_Selectors_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[9]/td[2]/div/span - Mouse Over xpath=${TextSuspension} sleep 1 + ${TextValueXpath}= SystemUsageGetText ${type} + Mouse Over xpath=${TextSuspension} + sleep 2 ${text2} get text xpath=${TextValueXpath} [Return] ${text2} SystemUsagePolicySQLVerification [Arguments] ${type} ${DisabledOREnabled} - [Documentation] - ... Sleep 1 click id=children6 #点击一级目录Settings Sleep 1 @@ -2090,8 +2025,8 @@ SystemUsagePolicySQLVerification SystemUsageObjectsSQLVerification [Arguments] ${type} - [Documentation] - ... + [Documentation] + ... ${type}:验证的类型 Sleep 1 click id=children6 #点击一级目录Settings Sleep 1 @@ -2131,6 +2066,220 @@ SystemUsageObjectsSQLVerification Disconnect From Database Should Be Equal As Strings ${text1} ${text2} +SystemUsageGetText + [Arguments] ${type} + sleep 1 + ${TextValueXpath} Set Variable if "${type}"=="Proxy_Disabled" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span #在文本统计获取Value定位变量赋值 + ... "${type}"=="Proxy_Enabled" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span + ... "${type}"=="Security_Disabled" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span + ... "${type}"=="Security_Enabled" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span + ... "${type}"=="WANNAT_Disabled" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span + ... "${type}"=="WANNAT_Enabled" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span + ... "${type}"=="ProxyTCPOptions_Disabled" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span + ... "${type}"=="ProxyTCPOptions_Enabled" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span + ... "${type}"=="Accounts_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span + ... "${type}"=="Accounts_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span + ... "${type}"=="FQDNs_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span + ... "${type}"=="FQDNs_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span + ... "${type}"=="HTTPSignatures_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span + ... "${type}"=="HTTPSignatures_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span + ... "${type}"=="Keywords_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span + ... "${type}"=="Keywords_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span + ... "${type}"=="SubscriberIDs_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span + ... "${type}"=="SubscriberIDs_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span + ... "${type}"=="URLs_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span + ... "${type}"=="URLs_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span + ... "${type}"=="IPAddresses_IPV4_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[3]/td[2]/div/span + ... "${type}"=="IPAddresses_IPV6_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[4]/td[2]/div/span + ... "${type}"=="IPAddresses_IP_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span + ... "${type}"=="IPAddresses_Geography_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[7]/td[2]/div/span + ... "${type}"=="IPAddresses_Geography_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[6]/td[2]/div/span + ... "${type}"=="IPAddresses_IPLearning_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[9]/td[2]/div/span + ... "${type}"=="IPAddresses_IPLearning_Items(IPv4)" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[10]/td[2]/div/span + ... "${type}"=="Applications_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span + ... "${type}"=="Applications_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[3]/td[2]/div/span + ... "${type}"=="Applications_Groups_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[5]/td[2]/div/span + ... "${type}"=="Applications_Groups_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[6]/td[2]/div/span + ... "${type}"=="Applications_Selectors_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[8]/td[2]/div/span + ... "${type}"=="Applications_Selectors_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[9]/td[2]/div/span + [Return] ${TextValueXpath} + + +CreatePacketCapture + [Arguments] ${name} ${AddressType} ${ClientIP} ${Protocol} ${EffectiveDevices} ${CapturedNumber} ${CaptureDuration} ${ClientPort}=null ${ServerIP}=null ${ServerPort}=null + [Documentation] + ... ${name}:name + ... ${AddressType}:IPV4 or IPV6 + ... ${ClientIP}:客户端IP + ... ${Protocol}:协议 + ... ${EffectiveDevices}:生效范围 + ... ${CapturedNumber}:最大捕包数 + ... ${CaptureDuration}:捕包时长 + ... ${ClientPort}:客户端端口 默认为空 + ... ${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 + click id=packet_create + sleep 2 + input id=PacketCaptureadd_name ${name} + sleep 1 + run keyword if "${AddressType}"=="IPV6" run keywords sleep 1 + ... AND click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[1]/div/div[2]/form/div[2]/div/div/div/span/span/i + ... AND sleep 1 + ... AND click id=select_addrtype1 + ... AND sleep 1 + input id=PacketCaptureadd_cliIp ${ClientIP} + sleep 1 + run keyword if "${ClientPort}"!="null" run keywords sleep 1 + ... AND input id=PacketCaptureadd_cliPort ${ClientPort} + ... AND sleep 1 + ... ELSE log ClientPort不输入 + run keyword if "${ServerIP}"!="null" run keywords sleep 1 + ... AND input id=PacketCaptureadd_serIp ${ServerIP} + ... AND sleep 1 + ... ELSE log ServerIP不输入 + run keyword if "${ServerPort}"!="null" run keywords sleep 1 + ... AND input id=PacketCaptureadd_serPort ${ServerPort} + ... AND sleep 1 + ... ELSE log ServerPort不输入 + click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[1]/div/div[2]/form/div[7]/div/div/div/span/span/i + sleep 1 + run keyword if "${Protocol}"=="TCP" run keywords sleep 1 + ... AND click id=select_Protocol0 + ... ELSE IF "${Protocol}"=="UDP" run keywords sleep 1 + ... AND click id=select_Protocol1 + ... ELSE IF "${Protocol}"=="Any" run keywords sleep 1 + ... AND click id=select_Protocol2 + sleep 1 + PacketCaptureEffectiveDevices ${EffectiveDevices} + input id=PacketCaptureadd_MaxPacketCapNum ${CapturedNumber} + sleep 1 + input id=PacketCaptureadd_pcapStorageDay ${CaptureDuration} + sleep 1 + click id=packetCaptureAdd_ok + Wait Until Element is Visible xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1] 30 + Settings-search ${name} name + sleep 1 + ${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} + +EditPacketCapture + [Arguments] ${name} ${AddressType} ${ClientIP} ${Protocol} ${EffectiveDevices} ${CapturedNumber} ${CaptureDuration} ${ClientPort}=null ${ServerIP}=null ${ServerPort}=null + [Documentation] + ... ${name}:name + ... ${AddressType}:IPV4 or IPV6 + ... ${ClientIP}:客户端IP + ... ${Protocol}:协议 + ... ${EffectiveDevices}:生效范围 + ... ${CapturedNumber}:最大捕包数 + ... ${CaptureDuration}:捕包时长 + ... ${ClientPort}:客户端端口 默认为空 + ... ${ServerIP}:服务器 IP 默认为空 + ... ${ServerPort}:服务器端口 默认为空 + click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1] + Sleep 1 + click id=packet_edit + sleep 2 + input id=PacketCaptureadd_name ${name} + sleep 1 + run keyword if "${AddressType}"=="IPV6" run keywords sleep 1 + ... AND click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[1]/div/div[2]/form/div[2]/div/div/div/span/span/i + ... AND sleep 1 + ... AND click id=select_addrtype1 + ... AND sleep 1 + input id=PacketCaptureadd_cliIp ${ClientIP} + sleep 1 + run keyword if "${ClientPort}"!="null" run keywords sleep 1 + ... AND Clear Element Text id=PacketCaptureadd_cliPort + ... AND sleep 1 + ... AND input id=PacketCaptureadd_cliPort ${ClientPort} + ... AND sleep 1 + ... ELSE log ClientPort不输入 + run keyword if "${ServerIP}"!="null" run keywords sleep 1 + ... AND input id=PacketCaptureadd_serIp ${ServerIP} + ... AND sleep 1 + ... ELSE log ServerIP不输入 + run keyword if "${ServerPort}"!="null" run keywords sleep 1 + ... AND Clear Element Text id=PacketCaptureadd_serPort + ... AND sleep 1 + ... AND input id=PacketCaptureadd_serPort ${ServerPort} + ... AND sleep 1 + ... ELSE log ServerPort不输入 + click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[1]/div/div[2]/form/div[7]/div/div/div/span/span/i + sleep 1 + run keyword if "${Protocol}"=="TCP" run keywords sleep 1 + ... AND click id=select_Protocol0 + ... ELSE IF "${Protocol}"=="UDP" run keywords sleep 1 + ... AND click id=select_Protocol1 + ... ELSE IF "${Protocol}"=="Any" run keywords sleep 1 + ... AND click id=select_Protocol2 + sleep 1 + click id=packetCaptureAdd_effremove + sleep 1 + PacketCaptureEffectiveDevices ${EffectiveDevices} + input id=PacketCaptureadd_MaxPacketCapNum ${CapturedNumber} + sleep 1 + input id=PacketCaptureadd_pcapStorageDay ${CaptureDuration} + sleep 1 + click id=packetCaptureAdd_ok + Wait Until Element is Visible xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1] 30 + Settings-search ${name} name + sleep 1 + ${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 + sleep 1 + run keyword if "${EffectiveDevices}"=="Nur-sultan" run keywords sleep 1 + ... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[1]/div[1]/label/span/span + ... ELSE IF "${EffectiveDevices}"=="Aktau" run keywords sleep 1 + ... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[2]/div[1]/label/span/span + ... ELSE IF "${EffectiveDevices}"=="Aktubinsk" run keywords sleep 1 + ... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[3]/div[1]/label/span/span + ... ELSE IF "${EffectiveDevices}"=="Almaty" run keywords sleep 1 + ... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[4]/div[1]/label/span/span + ... ELSE IF "${EffectiveDevices}"=="Atyrau" run keywords sleep 1 + ... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[5]/div[1]/label/span/span + ... ELSE IF "${EffectiveDevices}"=="Karaganda" run keywords sleep 1 + ... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[6]/div[1]/label/span/span + ... ELSE IF "${EffectiveDevices}"=="Kokshetau" run keywords sleep 1 + ... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[7]/div[1]/label/span/span + ... ELSE IF "${EffectiveDevices}"=="Kostanay" run keywords sleep 1 + ... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[8]/div[1]/label/span/span + ... ELSE IF "${EffectiveDevices}"=="Kyzylorda" run keywords sleep 1 + ... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[9]/div[1]/label/span/span + ... ELSE IF "${EffectiveDevices}"=="Pavlodar" run keywords sleep 1 + ... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[10]/div[1]/label/span/span + ... ELSE IF "${EffectiveDevices}"=="Petropavl" run keywords sleep 1 + ... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[11]/div[1]/label/span/span + ... ELSE IF "${EffectiveDevices}"=="Semey" run keywords sleep 1 + ... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[12]/div[1]/label/span/span + ... ELSE IF "${EffectiveDevices}"=="Shymkent" run keywords sleep 1 + ... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[13]/div[1]/label/span/span + ... ELSE IF "${EffectiveDevices}"=="Taldykurgan" run keywords sleep 1 + ... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[14]/div[1]/label/span/span + ... ELSE IF "${EffectiveDevices}"=="Taraz" run keywords sleep 1 + ... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[15]/div[1]/label/span/span + ... ELSE IF "${EffectiveDevices}"=="Uralsk" run keywords sleep 1 + ... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[16]/div[1]/label/span/span + ... ELSE IF "${EffectiveDevices}"=="Ust-Kamenogorsk" run keywords sleep 1 + ... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[17]/div[1]/label/span/span + ... ELSE IF "${EffectiveDevices}"=="Zhezkazgan" run keywords sleep 1 + ... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[18]/div[1]/label/span/span + sleep 1 + click id=proxyManipulationConditionsAreaSuccess + sleep 1 + Switch_Geographic_Locations [Arguments] ${Continent/Country} sleep 1 @@ -2142,6 +2291,7 @@ Switch_Geographic_Locations sleep 1 click id=interceptionadd_allcancelobject9 sleep 1 + Ip_Range_Create [Arguments] ${j} ${ip} sleep 1 @@ -2301,6 +2451,12 @@ DeleteSSLFingerprint click xpath=/html/body/div/div/div[3]/button[2] sleep 3 +DeletePacketCapture + sleep 2 + click id=packet_del + sleep 2 + click xpath=/html/body/div/div/div[3]/button[2] + sleep 3 Policy_Verify_Switch [Arguments] ${Protocol}