diff --git a/01-TestCase/tsg_ui/ui_proxy/Proxy.robot b/01-TestCase/tsg_ui/ui_proxy/Proxy.robot index aa79d47..b4fa134 100644 --- a/01-TestCase/tsg_ui/ui_proxy/Proxy.robot +++ b/01-TestCase/tsg_ui/ui_proxy/Proxy.robot @@ -88,3 +88,4 @@ ProxyPolicy-Deny-HTTP-MaxCombination-Drop-403 Should Be Equal As Strings ${text} ProxyPolicy-Deny-MaxCombination-403 ${PolicyName} set variable ProxyPolicy-Deny-MaxCombination-403 + diff --git a/02-Keyword/tsg_ui/policy/Testcase-UIPolicy.robot b/02-Keyword/tsg_ui/policy/Testcase-UIPolicy.robot index 1e2dd00..d5b5619 100644 --- a/02-Keyword/tsg_ui/policy/Testcase-UIPolicy.robot +++ b/02-Keyword/tsg_ui/policy/Testcase-UIPolicy.robot @@ -36,32 +36,32 @@ Test-UIAddPolicies ${ResponseHeadername} create list zdhressck zdhresct ${RequestContentname} create list zdhreqcontent ${filter} create list Host URL Request Header Response Header Request Content - ${policyInfo} Create Dictionary policyType=Security Policy policyName=${TEST NAME} policyAction=deny policySubAction=RST ApplicationSearch=HTTP policyLogSession=1 policyEnabled=1 - ${sip1} Create Dictionary sordtype=Source type1=Ip CreateOrSearch=Create Add=Address name=${TEST NAME}_IP1 ipclienttext1=192.168.40.11-192.168.40.110 port=1-65535 + ${policyInfo} Create Dictionary PolicyType=Security Policy PolicyName=${TEST NAME} PolicyAction=Deny PolicySubAction=RST ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1 + ${sip1} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME}_IP1 Ipclienttext1=192.168.40.11-192.168.40.110 Port=1-65535 ${ip_name} create list ${TEST NAME}_IP1 - ${sip2} Create Dictionary sordtype=Source type1=Ip CreateOrSearch=Create Add=Group name=${TEST NAME}_IPGroup1 object_name=${ip_name} + ${sip2} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Group Name=${TEST NAME}_IPGroup1 ObjectName=${ip_name} ${Country} create list Botswana ${City} create list Dekar - ${sgeo1} Create Dictionary sordtype=Source type1=Geography CreateOrSearch=Create Add=Address name=${TEST NAME}_Geo1 Country=${Country} City=${City} + ${sgeo1} Create Dictionary Sordtype=Source Type1=Geography CreateOrSearch=Create Add=Address Name=${TEST NAME}_Geo1 Country=${Country} City=${City} ${sgeo_name} create list ${TEST NAME}_Geo1 - ${sgeo2} Create Dictionary sordtype=Source type1=Geography CreateOrSearch=Create Add=Group name=${TEST NAME}_GeoGroup1 object_name=${sgeo_name} - ${slearn1} Create Dictionary sordtype=Source type1=IPLearning CreateOrSearch=Create Add=Address name=${TEST NAME}_Learn1 fqdn=*www.baidu.com Protocols1=HTTP Degree=2Degrees limits=10000 numbers=1 times=10000 - ${slearn2} Create Dictionary sordtype=Source type1=IPLearning CreateOrSearch=Create Add=Address name=${TEST NAME}_Learn2 fqdn=*www.baidu.com Protocols1=HTTPSSL Degree=1Degrees limits=10000 numbers=1 times=72 - ${ssub1} Create Dictionary sordtype=Source type1=SUBID CreateOrSearch=Create Add=Address name=${TEST NAME}_Subid1 keywordtext=$test25 + ${sgeo2} Create Dictionary Sordtype=Source Type1=Geography CreateOrSearch=Create Add=Group Name=${TEST NAME}_GeoGroup1 ObjectName=${sgeo_name} + ${slearn1} Create Dictionary Sordtype=Source Type1=IPLearning CreateOrSearch=Create Add=Address Name=${TEST NAME}_Learn1 Fqdn=*www.baidu.com Protocols1=HTTP Degree=2Degrees Limits=10000 Numbers=1 Times=10000 + ${slearn2} Create Dictionary Sordtype=Source Type1=IPLearning CreateOrSearch=Create Add=Address Name=${TEST NAME}_Learn2 Fqdn=*www.baidu.com Protocols1=HTTPSSL Degree=1Degrees Limits=10000 Numbers=1 Times=72 + ${ssub1} Create Dictionary Sordtype=Source Type1=SUBID CreateOrSearch=Create Add=Address Name=${TEST NAME}_Subid1 Keywordtext=$test25 ${sub_name} create list ${TEST NAME}_Subid1 - ${ssub2} Create Dictionary sordtype=Source type1=SUBID CreateOrSearch=Create Add=Group name=${TEST NAME}_Subid2 object_name=${sub_name} + ${ssub2} Create Dictionary Sordtype=Source Type1=SUBID CreateOrSearch=Create Add=Group Name=${TEST NAME}_Subid2 ObjectName=${sub_name} ${sourceAddIpList} Create List ${sip1} ${sip2} ${slearn1} ${slearn2} ${ssub1} ${ssub2} ${sgeo1} ${sgeo2} ${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList} ${ip_name1} create list ${TEST NAME}_IP1 ${TEST NAME}_IPGroup1 ${sgeo_name1} create list ${TEST NAME}_Geo1 ${TEST NAME}_GeoGroup1 ${slearn_name1} create list ${TEST NAME}_Learn1 ${TEST NAME}_Learn2 ${sub_name1} create list ${TEST NAME}_Subid1 ${TEST NAME}_Subid2 - ${dip1} Create Dictionary sordtype=Destination type1=Ip CreateOrSearch=Search object_name=${ip_name1} - ${dsgeo} Create Dictionary sordtype=Destination type1=Geography CreateOrSearch=Search object_name=${sgeo_name1} - ${dslearn} Create Dictionary sordtype=Destination type1=IPLearning CreateOrSearch=Search object_name=${slearn_name1} + ${dip1} Create Dictionary Sordtype=Destination Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1} + ${dsgeo} Create Dictionary Sordtype=Destination Type1=Geography CreateOrSearch=Search ObjectName=${sgeo_name1} + ${dslearn} Create Dictionary Sordtype=Destination Type1=IPLearning CreateOrSearch=Search ObjectName=${slearn_name1} ${destinationAddIpList} Create List ${dip1} ${dsgeo} ${dslearn} ${destinationInfo} Create Dictionary destinationAddIpList=${destinationAddIpList} ${filterInfo} Create Dictionary Filter=${filter} Hostname=${hostname} URLname=${urlname} Request Headername=${RequestHeadername} Response Headername=${ResponseHeadername} ... Request Contentname=${RequestContentname} - UIAddPolicies ${policyInfo} sourceInfo=${sourceInfo} destinationInfo=${destinationInfo} filterInfo=${filterInfo} + UIAddPolicies ${policyInfo} SourceInfo=${sourceInfo} DestinationInfo=${destinationInfo} FilterInfo=${filterInfo} diff --git a/02-Keyword/tsg_ui/policy/UIPolicy.robot b/02-Keyword/tsg_ui/policy/UIPolicy.robot index 724ed03..76ca185 100644 --- a/02-Keyword/tsg_ui/policy/UIPolicy.robot +++ b/02-Keyword/tsg_ui/policy/UIPolicy.robot @@ -9,537 +9,555 @@ Resource ../../../03-Variable/BifangApiVariable.txt *** Keywords *** UIAddPolicies - [Arguments] ${policyInfo} ${sourceInfo}=null ${destinationInfo}=null ${filterInfo}=null ${subactionadd}=null ${Keyring}=null ${MirrorDecryptedTrafficInfo}=null ${DecryptionProfile}=null + [Arguments] ${PolicyInfo} ${SourceInfo}=null ${DestinationInfo}=null ${FilterInfo}=null ${Subactionadd}=null ${Keyring}=null ${MirrorDecryptedTrafficInfo}=null ${DecryptionProfile}=null ... ${ProxyDenyadd}=null ${DenyRedirectadd}=null ${ReplaceActionParameters}=null ${HijackFileadd}=null ${InsertScript}=null - [Documentation] 创建策略 - + [Documentation] 创建策略 + ... 调用次关键字前需要添加参数: + ... ${PolicyInfo}是个字典:实例 ${PolicyInfo} Create Dictionary PolicyType=Security Policy PolicyName=${TEST NAME} PolicyAction=deny PolicySubAction=RST ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1 + ... ${SourceInfo}是个字典:实例:sourceAddIpList=${sourceAddIpList} ${sourceAddIpList}是个列表,${sourceAddIpList} Create List ${sip1} 列表中是个字典:,实例:${sip1} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME}_IP1 Ipclienttext1=192.168.40.11-192.168.40.110 Port=1-65535 + ... ${DestinationInfo}和${SourceInfo}格式一致 + ... ${FilterInfo}是个字典:实例${FilterInfo} Create Dictionary Filter=${filter} Hostname=${hostname} URLname=${urlname} Request Headername=${RequestHeadername} Response Headername=${ResponseHeadername} 其中${filter}是个列表:实例${filter} create list Host URL Request Header Response Header Request Content,其中${xxxname}是对象的名字 + ... ${Subactionadd}是一个字典:在"${PolicyType}"=="Security Policy" and "${PolicyAction}"=="deny" 并且PolicySubAction为Block或Alert或Redirect时需要的一个参数,例如:PolicySubAction=Block时需要填入:${Subactionadd} Create Dictionary code=403 Content=TEXT block-text=123456 + ... ${Keyring}是一个字典,在"${PolicyType}"=="Security Policy" and "${PolicyAction}"=="intercept" and "ApplicationSearchV"=="SSL" 时需要根据用例情况填入,例如:name=证书名字 ${File}=文件所在路径 ${File1}=文件所在路径 ExpiryHours1or2=1或其他 ${Type}=上传证书类型的元素 ${Type1}=上传证书加密解密算法的元素 ${Shift}=close或open ${PrivateKeyType}=HSM或其他 + ... ${MirrorDecryptedTrafficInfo}是个字典:在"${PolicyType}"=="Security Policy" and "${PolicyAction}"=="intercept" and "ApplicationSearchV"=="SSL" 时需要根据用例情况填入,例如:${MirrorDecryptedTraffic}=输入open代表开启按钮,其他代表不开启,${MirrorDecryptedTrafficSearchorCreate}=填入Create或Search,${MirrorDecryptedTrafficname}=解密流量文件的name,${Type}=是mac还是vlan的定位元素,${Shuru}=输入mac或vlan的值 + ... ${DecryptionProfile}是个字典:在"${PolicyType}"=="Security Policy" and "${PolicyAction}"=="intercept" and "ApplicationSearchV"=="SSL" 时需要根据用例情况填入,例如:${DecryptionProfileSearchorCreate}=填入Create或Search,${DecryptionProfilename}=文件name,${Dict1}:是个字典,等于1为开启,等于0为关闭,例如:Common Name=1 Issuer=1 Self-signed=1 Expiry Date=1 EV Certificat=1 Certificate Transparency=1 Mutual Authentication=1 On Protocol Errors=1 Certificate Pinning=1 Certificate Not Installed=1 Mirror Client Versions=1 Allow HTTP/2=1 ${Fail1} =输入Fail-close或Pass-through,${Min1}=输入协议版本,${Max1}=输入协议版本, + ... ${ProxyDenyadd}是个字典:例如:${DenyCode}=填入403或404或451,${Action}=填入deny,${Code}=填入403或404,${Content}=填入TEXT或Profile,${SearchorCreate}=填入Search或Create,${BlockText}=填入TEXT文本框内容,${ProfileName}=Profile的名字,${File}=上传文件路径,${TextValue}=填入text输入框内容 + ... ${DenyRedirectadd}是个字典:例如:${QType}:填入A或AAAA,${Avalue}:根据${QType}填入IPV4或IPV6的值,${Attl}:根据${QType}填入A的ttl值或AAAA的ttl值,${CNAMEvalue}:根据${QType}填入A的CNAME的域名值或AAAA的CNAME域名值,${CNAMEttl}:根据${QType}填入A的CNAME的ttl值或AAAA的CNAME的ttl值 + ... ${ReplaceActionParameters}是个字典:例如:${ParametersType}:列表格式,Search 下拉框中内容 ,${xxxFind}:是Find输入框输入的值,${XXXReplacewith}:是 Replacewith输入框中输入的值 + ... ${HijackFileadd}是个字典:例如:${SearchorCreate}:填入Search或Create,${Hijackname}:填入新建hijack的name,${Hijackfile}:填入新建hijack文件的路径,${DowName}:根据情况填入close或open或其他,${Input};填入shuru或其他,${Hijacktype}:填入选择文件类型的元素 + ... ${InsertScript}是个字典:例如:${SearchorCreate}:填入Search或Create,${Insertname}:填入新建insert的name,${Insertfile}:填入新建insert文件的路径,${Inserttype}:根据情况填入css或js,${Insertjstype};填入Before Page Load或After Page Load ${emptyList} Create List - ${return} ${policyType} Run Keyword And Ignore Error Get From Dictionary ${policyInfo} policyType - ${policyType} Run Keyword If "${return}"=="FAIL" or "${policyType}"=="${EMPTY}" set variable ${Default_PolicyType} - ... ELSE set variable ${policyType} + ${return} ${PolicyType} Run Keyword And Ignore Error Get From Dictionary ${PolicyInfo} PolicyType + ${PolicyType} Run Keyword If "${return}"=="FAIL" or "${PolicyType}"=="${EMPTY}" set variable ${Default_PolicyType} + ... ELSE set variable ${PolicyType} - ${return} ${policyName} Run Keyword And Ignore Error Get From Dictionary ${policyInfo} policyName - ${policyName} Run Keyword If "${return}"=="FAIL" or "${policyName}"=="${EMPTY}" set variable ${Default_PolicyName} - ... ELSE set variable ${policyName} + ${return} ${PolicyName} Run Keyword And Ignore Error Get From Dictionary ${PolicyInfo} PolicyName + ${PolicyName} Run Keyword If "${return}"=="FAIL" or "${PolicyName}"=="${EMPTY}" set variable ${Default_PolicyName} + ... ELSE set variable ${PolicyName} - ${return} ${policyAction} Run Keyword And Ignore Error Get From Dictionary ${policyInfo} policyAction - ${policyAction} Run Keyword If "${return}"=="FAIL" or "${policyAction}"=="${EMPTY}" set variable ${Default_Action} - ... ELSE set variable ${policyAction} + ${return} ${PolicyAction} Run Keyword And Ignore Error Get From Dictionary ${PolicyInfo} PolicyAction + ${PolicyAction} Run Keyword If "${return}"=="FAIL" or "${PolicyAction}"=="${EMPTY}" set variable ${Default_Action} + ... ELSE set variable ${PolicyAction} - ${return} ${policySubAction} Run Keyword And Ignore Error Get From Dictionary ${policyInfo} policySubAction - ${policySubAction} Run Keyword If "${return}"=="FAIL" or "${policySubAction}"=="${EMPTY}" set variable ${Default_PolicySubAction} - ... ELSE set variable ${policySubAction} + ${return} ${PolicySubAction} Run Keyword And Ignore Error Get From Dictionary ${PolicyInfo} PolicySubAction + ${PolicySubAction} Run Keyword If "${return}"=="FAIL" or "${PolicySubAction}"=="${EMPTY}" set variable ${Default_PolicySubAction} + ... ELSE set variable ${PolicySubAction} - ${return} ${ApplicationSearch} Run Keyword And Ignore Error Get From Dictionary ${policyInfo} ApplicationSearch + ${return} ${ApplicationSearch} Run Keyword And Ignore Error Get From Dictionary ${PolicyInfo} ApplicationSearch ${ApplicationSearchV} Run Keyword If "${return}"!="FAIL" and "${ApplicationSearch}"!="${EMPTY}" and "${ApplicationSearch}"!="${None}" Evaluate list(re.split('[,]', '${ApplicationSearch}')) re ... ELSE Set Variable ${emptyList} - ${return} ${policyLogSession} Run Keyword And Ignore Error Get From Dictionary ${policyInfo} policyLogSession - ${policyLogSession} Run Keyword If "${return}"=="FAIL" or "${policyLogSession}"=="${EMPTY}" set variable ${Default_PolicyLogSession} - ... ELSE set variable ${policyName} + ${return} ${PolicyLogSession} Run Keyword And Ignore Error Get From Dictionary ${PolicyInfo} PolicyLogSession + ${PolicyLogSession} Run Keyword If "${return}"=="FAIL" or "${PolicyLogSession}"=="${EMPTY}" set variable ${Default_PolicyLogSession} + ... ELSE set variable ${PolicyLogSession} - ${return} ${LogOptions} Run Keyword And Ignore Error Get From Dictionary ${policyInfo} LogOptions + ${return} ${LogOptions} Run Keyword And Ignore Error Get From Dictionary ${PolicyInfo} LogOptions ${LogOptions} Run Keyword If "${return}"=="FAIL" or "${LogOptions}"=="${EMPTY}" set variable 1 ... ELSE set variable ${LogOptions} - ${return} ${policyEnabled} Run Keyword And Ignore Error Get From Dictionary ${policyInfo} policyEnabled - ${policyEnabled} Run Keyword If "${return}"=="FAIL" or "${policyEnabled}"=="${EMPTY}" set variable ${Default_PolicyEnabled} - ... ELSE set variable ${policyEnabled} + ${return} ${PolicyEnabled} Run Keyword And Ignore Error Get From Dictionary ${PolicyInfo} PolicyEnabled + ${PolicyEnabled} Run Keyword If "${return}"=="FAIL" or "${PolicyEnabled}"=="${EMPTY}" set variable ${Default_PolicyEnabled} + ... ELSE set variable ${PolicyEnabled} Comment 新建策略 打开菜单 - Menu policys ${policyType} + Menu policys ${PolicyType} Comment 新建策略 打开安全策略列表上方的新建策略按钮 UIPolicy.CreateButton - UIPolicy.Create-name ${policyType} ${policyName} - UIPolicy.Create-actions ${policyType} ${policyAction} + UIPolicy.Create-name ${PolicyType} ${PolicyName} + UIPolicy.Create-actions ${PolicyType} ${PolicyAction} #Create-Source-Button - Run Keyword If "${sourceInfo}"=="${EMPTY}" log there is no sourceInfoDict + Run Keyword If "${SourceInfo}"=="${EMPTY}" log there is no SourceInfoDict ... ELSE UIPolicy. Create-Source-Button - Run Keyword If "${sourceInfo}"=="${EMPTY}" log there is no sourceInfoDict - ... ELSE UIPolicy.CreateEditDeleteSources ${sourceInfo} + Run Keyword If "${SourceInfo}"=="${EMPTY}" log there is no SourceInfoDict + ... ELSE UIPolicy.CreateEditDeleteSources ${SourceInfo} - Run Keyword If "${destinationInfo}"=="${EMPTY}" log there is no destinationInfo + Run Keyword If "${DestinationInfo}"=="${EMPTY}" log there is no DestinationInfo ... ELSE UIPolicy.Create-Destination-Button - Run Keyword If "${destinationInfo}"=="${EMPTY}" log there is no destinationInfo - ... ELSE UIPolicy.CreateEditDeleteDestination ${destinationInfo} + Run Keyword If "${DestinationInfo}"=="${EMPTY}" log there is no DestinationInfo + ... ELSE UIPolicy.CreateEditDeleteDestination ${DestinationInfo} - UIPolicy.Create-Application-Button ${policyType} ${ApplicationSearchV} ${policyAction} + UIPolicy.Create-Application-Button ${PolicyType} ${ApplicationSearchV} ${PolicyAction} #编辑filter - Run Keyword If "${filterInfo}"=="${EMPTY}" log there is no filterInfo - ... ELSE Create-Filter-SecurityOrProxy ${policyType} ${ApplicationSearchV}[0] ${filterInfo} - Run Keyword If "${policyType}"=="Security Policy" and "${policyAction}"=="deny" run keywords sleep 2 - ... AND Deny-subaction-1 ${policyAction} ${policySubAction} ${subactionadd} - Run Keyword If "${policyType}"=="Security Policy" and "${policyAction}"=="intercept" and "ApplicationSearchV"=="SSL" run keywords sleep 2 - ... AND interceptadd ${Keyring} ${MirrorDecryptedTrafficInfo} ${DecryptionProfile} - Run Keyword If "${policyType}"=="Proxy Policy" and "${policyAction}"=="deny" run keywords sleep 2 + Run Keyword If "${FilterInfo}"=="${EMPTY}" log there is no FilterInfo + ... ELSE Create-Filter-SecurityOrProxy ${PolicyType} ${ApplicationSearchV}[0] ${FilterInfo} + Run Keyword If "${PolicyType}"=="Security Policy" and "${PolicyAction}"=="deny" run keywords sleep ${sleep} + ... AND Deny-subaction-1 ${PolicyAction} ${PolicySubAction} ${Subactionadd} + Run Keyword If "${PolicyType}"=="Security Policy" and "${PolicyAction}"=="intercept" and "ApplicationSearchV"=="SSL" run keywords sleep ${sleep} + ... AND Interceptadd ${Keyring} ${MirrorDecryptedTrafficInfo} ${DecryptionProfile} + Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="deny" run keywords sleep ${sleep} ... AND Proxy-Deny ${ProxyDenyadd} - Run Keyword If "${policyType}"=="Proxy Policy" and "${policyAction}"=="redirect" run keywords sleep 2 + Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="redirect" run keywords sleep ${sleep} ... AND Deny-Redirect ${DenyRedirectadd} - Run Keyword If "${policyType}"=="Proxy Policy" and "${policyAction}"=="replace" run keywords sleep 2 + Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="replace" run keywords sleep ${sleep} ... AND Replace-Action-Parameters-for1 ${ReplaceActionParameters} - Run Keyword If "${policyType}"=="Proxy Policy" and "${policyAction}"=="hijack" run keywords sleep 2 + Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="hijack" run keywords sleep ${sleep} ... AND HijackFile-SearchorCreate ${HijackFileadd} - Run Keyword If "${policyType}"=="Proxy Policy" and "${policyAction}"=="insert" run keywords sleep 2 + Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="insert" run keywords sleep ${sleep} ... AND InsertScript-SearchorCreate ${InsertScript} - Run Keyword If "${policyType}"=="Proxy Policy" run keywords ProxyLogSession ${policyLogSession} + Run Keyword If "${PolicyType}"=="Proxy Policy" run keywords ProxyLogSession ${PolicyLogSession} ... AND ProxyLogOptions ${LogOptions} - ... ELSE LogSession ${policyLogSession} - Run Keyword If "${policyType}"=="Security Policy" Enabled ${policyEnabled} - ... ELSE ProxyEnabled ${policyEnabled} - Run Keyword If "${policyType}"=="Security Policy" Security-Policies-OK + ... ELSE LogSession ${PolicyLogSession} + Run Keyword If "${PolicyType}"=="Security Policy" Enabled ${PolicyEnabled} + ... ELSE ProxyEnabled ${PolicyEnabled} + Run Keyword If "${PolicyType}"=="Security Policy" Security-Policies-OK ... ELSE Proxy-Policies-OK - Security-Source Name ${policyName} - Run Keyword If "${policyType}"=="Security Policy" SecurityAssert ${policyName} - ... ELSE ProxyAssert ${policyName} + Security-Source Name ${PolicyName} + Run Keyword If "${PolicyType}"=="Security Policy" SecurityAssert ${PolicyName} + ... ELSE ProxyAssert ${PolicyName} UIUpdataPolicies - [Arguments] ${policyInfo} ${sourceInfo}=null ${destinationInfo}=null ${filterInfo}=null ${subactionadd}=null ${Keyring}=null ${MirrorDecryptedTrafficInfo}=null ${DecryptionProfile}=null + [Arguments] ${PolicyInfo} ${SourceInfo}=null ${DestinationInfo}=null ${FilterInfo}=null ${Subactionadd}=null ${Keyring}=null ${MirrorDecryptedTrafficInfo}=null ${DecryptionProfile}=null ... ${ProxyDenyadd}=null ${DenyRedirectadd}=null ${ReplaceActionParameters}=null ${HijackFileadd}=null ${InsertScript}=null [Documentation] 编辑策略 ${emptyList} Create List - ${return} ${policyType} Run Keyword And Ignore Error Get From Dictionary ${policyInfo} policyType - ${policyType} Run Keyword If "${return}"=="FAIL" or "${policyType}"=="${EMPTY}" set variable ${Default_PolicyType} - ... ELSE set variable ${policyType} + ${return} ${PolicyType} Run Keyword And Ignore Error Get From Dictionary ${PolicyInfo} PolicyType + ${PolicyType} Run Keyword If "${return}"=="FAIL" or "${PolicyType}"=="${EMPTY}" set variable ${Default_PolicyType} + ... ELSE set variable ${PolicyType} - ${return} ${policyName} Run Keyword And Ignore Error Get From Dictionary ${policyInfo} policyName - ${policyName} Run Keyword If "${return}"=="FAIL" or "${policyName}"=="${EMPTY}" set variable ${Default_PolicyName} - ... ELSE set variable ${policyName} + ${return} ${PolicyName} Run Keyword And Ignore Error Get From Dictionary ${PolicyInfo} PolicyName + ${PolicyName} Run Keyword If "${return}"=="FAIL" or "${PolicyName}"=="${EMPTY}" set variable ${Default_PolicyName} + ... ELSE set variable ${PolicyName} - ${return} ${policyEditName} Run Keyword And Ignore Error Get From Dictionary ${policyInfo} policyEditName - ${policyEditName} Run Keyword If "${return}"=="FAIL" or "${policyEditName}"=="${EMPTY}" set variable ${Default_PolicyName} - ... ELSE set variable ${policyEditName} + ${return} ${PolicyEditName} Run Keyword And Ignore Error Get From Dictionary ${PolicyInfo} PolicyEditName + ${PolicyEditName} Run Keyword If "${return}"=="FAIL" or "${PolicyEditName}"=="${EMPTY}" set variable ${Default_PolicyName} + ... ELSE set variable ${PolicyEditName} - ${return} ${policyAction} Run Keyword And Ignore Error Get From Dictionary ${policyInfo} policyAction - ${policyAction} Run Keyword If "${return}"=="FAIL" or "${policyAction}"=="${EMPTY}" set variable ${Default_Action} - ... ELSE set variable ${policyAction} + ${return} ${PolicyAction} Run Keyword And Ignore Error Get From Dictionary ${PolicyInfo} PolicyAction + ${PolicyAction} Run Keyword If "${return}"=="FAIL" or "${PolicyAction}"=="${EMPTY}" set variable ${Default_Action} + ... ELSE set variable ${PolicyAction} - ${return} ${policySubAction} Run Keyword And Ignore Error Get From Dictionary ${policyInfo} policySubAction - ${policySubAction} Run Keyword If "${return}"=="FAIL" or "${policySubAction}"=="${EMPTY}" set variable ${Default_PolicySubAction} - ... ELSE set variable ${policySubAction} + ${return} ${PolicySubAction} Run Keyword And Ignore Error Get From Dictionary ${PolicyInfo} PolicySubAction + ${PolicySubAction} Run Keyword If "${return}"=="FAIL" or "${PolicySubAction}"=="${EMPTY}" set variable ${Default_PolicySubAction} + ... ELSE set variable ${PolicySubAction} - ${return} ${ApplicationSearch} Run Keyword And Ignore Error Get From Dictionary ${policyInfo} ApplicationSearch + ${return} ${ApplicationSearch} Run Keyword And Ignore Error Get From Dictionary ${PolicyInfo} ApplicationSearch ${ApplicationSearchV} Run Keyword If "${return}"!="FAIL" and "${ApplicationSearch}"!="${EMPTY}" and "${ApplicationSearch}"!="${None}" Evaluate list(re.split('[,]', '${ApplicationSearch}')) re ... ELSE Set Variable ${emptyList} - ${return} ${policyLogSession} Run Keyword And Ignore Error Get From Dictionary ${policyInfo} policyLogSession - ${policyLogSession} Run Keyword If "${return}"=="FAIL" or "${policyLogSession}"=="${EMPTY}" set variable ${Default_PolicyLogSession} - ... ELSE set variable ${policyName} + ${return} ${ApplicationFilter} Run Keyword And Ignore Error Get From Dictionary ${PolicyInfo} ApplicationFilter + ${ApplicationFilter} Run Keyword If "${return}"=="FAIL" or "${ApplicationFilter}"=="${EMPTY}" set variable null + ... ELSE set variable ${ApplicationFilter} + + ${return} ${PolicyLogSession} Run Keyword And Ignore Error Get From Dictionary ${PolicyInfo} PolicyLogSession + ${PolicyLogSession} Run Keyword If "${return}"=="FAIL" or "${PolicyLogSession}"=="${EMPTY}" set variable ${Default_PolicyLogSession} + ... ELSE set variable ${PolicyLogSessionession} - ${return} ${LogOptions} Run Keyword And Ignore Error Get From Dictionary ${policyInfo} LogOptions + ${return} ${LogOptions} Run Keyword And Ignore Error Get From Dictionary ${PolicyInfo} LogOptions ${LogOptions} Run Keyword If "${return}"=="FAIL" or "${LogOptions}"=="${EMPTY}" set variable 1 ... ELSE set variable ${LogOptions} - ${return} ${policyEnabled} Run Keyword And Ignore Error Get From Dictionary ${policyInfo} policyEnabled - ${policyEnabled} Run Keyword If "${return}"=="FAIL" or "${policyEnabled}"=="${EMPTY}" set variable ${Default_PolicyEnabled} - ... ELSE set variable ${policyEnabled} + ${return} ${PolicyEnabled} Run Keyword And Ignore Error Get From Dictionary ${PolicyInfo} PolicyEnabled + ${PolicyEnabled} Run Keyword If "${return}"=="FAIL" or "${PolicyEnabled}"=="${EMPTY}" set variable ${Default_PolicyEnabled} + ... ELSE set variable ${PolicyEnabled} Comment 新建策略 打开菜单 - Menu policys ${policyType} + Menu policys ${PolicyType} - Comment 新建策略 打开安全策略列表上方的新建策略按钮 + Comment 新建策略 打开安全策略列表上方的新建策略按钮 UIPolicy.CreateButton Comment 搜索要编辑的策略 - Security-Source Name ${policyName} + Security-Source Name ${PolicyName} Comment 点击编辑按钮Edit EditButton Comment 编辑name - UIPolicy.Create-name ${policyType} ${policyEditName} - UIPolicy.Create-actions ${policyType} ${policyAction} - #Create-Source-Button - Run Keyword If "${sourceInfo}"=="${EMPTY}" log there is no sourceInfoDict + UIPolicy.Create-name ${PolicyType} ${PolicyEditName} + Comment 编辑action + UIPolicy.Create-actions ${PolicyType} ${PolicyAction} + Comment 编辑Source + Run Keyword If "${SourceInfo}"=="${EMPTY}" log there is no SourceInfoDict ... ELSE UIPolicy. Create-Source-Button - Run Keyword If "${sourceInfo}"=="${EMPTY}" log there is no sourceInfoDict - ... ELSE UIPolicy.CreateEditDeleteSources ${sourceInfo} - - Run Keyword If "${destinationInfo}"=="${EMPTY}" log there is no destinationInfo + Run Keyword If "${SourceInfo}"=="${EMPTY}" log there is no SourceInfoDict + ... ELSE UIPolicy.CreateEditDeleteSources ${SourceInfo} + Comment 编辑Destination + Run Keyword If "${DestinationInfo}"=="${EMPTY}" log there is no DestinationInfo ... ELSE UIPolicy.Create-Destination-Button - Run Keyword If "${destinationInfo}"=="${EMPTY}" log there is no destinationInfo - ... ELSE UIPolicy.CreateEditDeleteDestination ${destinationInfo} - - UIPolicy.Create-Application-Button ${policyType} ${ApplicationSearchV} ${policyAction} + Run Keyword If "${DestinationInfo}"=="${EMPTY}" log there is no DestinationInfo + ... ELSE UIPolicy.CreateEditDeleteDestination ${DestinationInfo} + Comment 编辑Application + UIPolicy.Create-Application-Button ${PolicyType} ${ApplicationSearchV} ${PolicyAction} #编辑filter - Run Keyword If "${filterInfo}"=="${EMPTY}" log there is no filterInfo - ... ELSE Create-Filter-SecurityOrProxy ${policyType} ${ApplicationSearchV}[0] ${filterInfo} - log 111111111111111111 - Run Keyword If "${policyType}"=="Security Policy" and "${policyAction}"=="deny" run keywords sleep 2 - ... AND Deny-subaction-1 ${policyAction} ${policySubAction} ${subactionadd} - Run Keyword If "${policyType}"=="Security Policy" and "${policyAction}"=="intercept" and "ApplicationSearchV"=="SSL" run keywords sleep 2 - ... AND interceptadd ${Keyring} ${MirrorDecryptedTrafficInfo} ${DecryptionProfile} - Run Keyword If "${policyType}"=="Proxy Policy" and "${policyAction}"=="deny" run keywords sleep 2 + Run Keyword If "${FilterInfo}"=="${EMPTY}" log there is no FilterInfo + ... ELSE Create-Filter-SecurityOrProxy ${PolicyType} ${ApplicationFilter} ${FilterInfo} + + Run Keyword If "${PolicyType}"=="Security Policy" and "${PolicyAction}"=="deny" run keywords sleep ${sleep} + ... AND Deny-subaction-1 ${PolicyAction} ${PolicySubAction} ${Subactionadd} + Run Keyword If "${PolicyType}"=="Security Policy" and "${PolicyAction}"=="intercept" and "ApplicationSearchV"=="SSL" run keywords sleep ${sleep} + ... AND Interceptadd ${Keyring} ${MirrorDecryptedTrafficInfo} ${DecryptionProfile} + Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="deny" run keywords sleep ${sleep} ... AND Proxy-Deny ${ProxyDenyadd} - Run Keyword If "${policyType}"=="Proxy Policy" and "${policyAction}"=="redirect" run keywords sleep 2 + Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="redirect" run keywords sleep ${sleep} ... AND Deny-Redirect ${DenyRedirectadd} - Run Keyword If "${policyType}"=="Proxy Policy" and "${policyAction}"=="replace" run keywords sleep 2 + Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="replace" run keywords sleep ${sleep} ... AND Replace-Action-Parameters-for1 ${ReplaceActionParameters} - Run Keyword If "${policyType}"=="Proxy Policy" and "${policyAction}"=="hijack" run keywords sleep 2 + Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="hijack" run keywords sleep ${sleep} ... AND HijackFile-SearchorCreate ${HijackFileadd} - Run Keyword If "${policyType}"=="Proxy Policy" and "${policyAction}"=="insert" run keywords sleep 2 + Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="insert" run keywords sleep ${sleep} ... AND InsertScript-SearchorCreate ${InsertScript} - Run Keyword If "${policyType}"=="Proxy Policy" run keywords ProxyLogSession ${policyLogSession} + Run Keyword If "${PolicyType}"=="Proxy Policy" run keywords ProxyLogSession ${PolicyLogSession} ... AND ProxyLogOptions ${LogOptions} - ... ELSE LogSession ${policyLogSession} - Run Keyword If "${policyType}"=="Security Policy" Enabled ${policyEnabled} - ... ELSE ProxyEnabled ${policyEnabled} - Run Keyword If "${policyType}"=="Security Policy" Security-Policies-OK + ... ELSE LogSession ${PolicyLogSession} + Run Keyword If "${PolicyType}"=="Security Policy" Enabled ${PolicyEnabled} + ... ELSE ProxyEnabled ${PolicyEnabled} + Run Keyword If "${PolicyType}"=="Security Policy" Security-Policies-OK ... ELSE Proxy-Policies-OK - Security-Source Name ${policyName} - Run Keyword If "${policyType}"=="Security Policy" SecurityAssert ${policyName} - ... ELSE ProxyAssert ${policyName} + Security-Source Name ${PolicyName} + Run Keyword If "${PolicyType}"=="Security Policy" SecurityAssert ${PolicyName} + ... ELSE ProxyAssert ${PolicyName} SecurityAssert - [Arguments] ${policyName} + [Arguments] ${PolicyName} ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/p - Should Be Equal As Strings ${text} ${policyName} + Should Be Equal As Strings ${text} ${PolicyName} ProxyAssert - [Arguments] ${policyName} + [Arguments] ${PolicyName} ${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/div/p - Should Be Equal As Strings ${text} ${policyName} + Should Be Equal As Strings ${text} ${PolicyName} CreateEditDeleteSources - [Arguments] ${sourceInfoDict} + [Arguments] ${SourceInfoDict} [Documentation] 策略源条件处理、包括增加:create、search,update、delete几个列表; - ... 格式:新增:type1=IP option=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 port=1 - ... 修改:type1=IP option=Update Add=Address name=zdhip001 ipclienttext1=192.168.100.1 port=1 把为name对应值的的记录修改为输入的内容 - ... 新增:type1=Geography option=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 port=1geo - ${return} ${addList} Run Keyword And Ignore Error Get From Dictionary ${sourceInfoDict} sourceAddIpList - Run Keyword If "${return}"=="FAIL" or "${addList}"=="${EMPTY}" log there is no CreateSource - ... ELSE CreateSources1 ${addList} + ... 格式:新增:Type1=IP option=Create Add=Address name=zdhip001 Ipclienttext1=192.168.100.1 Port=1 + ... 修改:Type1=IP option=Update Add=Address name=zdhip001 Ipclienttext1=192.168.100.1 Port=1 把为name对应值的的记录修改为输入的内容 + ... 新增:Type1=Geography option=Create Add=Address name=zdhip001 Ipclienttext1=192.168.100.1 Port=1geo + ${return} ${AddList} Run Keyword And Ignore Error Get From Dictionary ${SourceInfoDict} sourceAddIpList + Run Keyword If "${return}"=="FAIL" or "${AddList}"=="${EMPTY}" log there is no CreateSource + ... ELSE CreateSources1 ${AddList} CreateSources1 - [Arguments] ${addList} + [Arguments] ${AddList} [Documentation] 调用次关键字前需要添加必填参数: - ... ${type1}:填入Ip或SUBID或Geography或IPLearning + ... ${Type1}:填入Ip或SUBID或Geography或IPLearning ... ${CreateOrSearch}:填入Create或者Search ... ${Add}:填入Address或Group - ... ${name}:名称 - ... ${ip_type}:填入Ip或者Geography或者IPLearning - ... ${ipclienttext1}:填入IPV4或6的值或range的ip段 - ... ${port}:填入端口 + ... ${Name}:名称 + ... ${Ip_type}:填入Ip或者Geography或者IPLearning + ... ${Ipclienttext1}:填入IPV4或6的值或range的ip段 + ... ${Port}:填入端口 ... ${Country}:列表形式,列表中是国家名字 ... ${City}:列表形式,列表中是城市名字 ... ${Protocols1}:填入HTTP或SSL或HTTPSSL ... ${Degree}:填入1Degree或2Degree - ... ${times}:填入小时数,例如1或2 - ... ${numbers}:填入数值,例如1或10000 - ... ${limits}:填入数值,例如1或10000 - ... ${object_name}:列表形式,列表中是对象的名字 - ... ${keywordtext}:填入新建subid的内容 + ... ${Times}:填入小时数,例如1或2 + ... ${Numbers}:填入数值,例如1或10000 + ... ${Limits}:填入数值,例如1或10000 + ... ${ObjectName}:列表形式,列表中是对象的名字 + ... ${Keywordtext}:填入新建subid的内容 ... 判断新建source选择用什么样的类型数据 - ${listlenth}= Get Length ${addList} + ${listlenth}= Get Length ${AddList} #${tempValue} set Variable tempValue - #FOR ${var} IN RANGE ${addList} + #FOR ${var} IN RANGE ${AddList} FOR ${var} IN RANGE ${listlenth} log ${var} - ${tempValue} Get From List ${addList} ${var} + ${tempValue} Get From List ${AddList} ${var} CreateSource ${tempValue} END CreateEditDeleteDestination - [Arguments] ${destinationInfoDict} + [Arguments] ${DestinationInfoDict} [Documentation] 策略源条件处理、包括增加:create、search,update、delete几个列表; - ... 格式:新增:type1=IP option=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 port=1 - ... 修改:type1=IP option=Update Add=Address name=zdhip001 ipclienttext1=192.168.100.1 port=1 把为name对应值的的记录修改为输入的内容 - ... 新增:type1=Geography option=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 port=1geo - ${return} ${addList} Run Keyword And Ignore Error Get From Dictionary ${destinationInfoDict} destinationAddIpList - Run Keyword If "${return}"=="FAIL" or "${addList}"=="${EMPTY}" log there is no CreateSource - ... ELSE CreateDestination1 ${addList} + ... 格式:新增:Type1=IP option=Create Add=Address name=zdhip001 Ipclienttext1=192.168.100.1 Port=1 + ... 修改:Type1=IP option=Update Add=Address name=zdhip001 Ipclienttext1=192.168.100.1 Port=1 把为name对应值的的记录修改为输入的内容 + ... 新增:Type1=Geography option=Create Add=Address name=zdhip001 Ipclienttext1=192.168.100.1 Port=1geo + ${return} ${AddList} Run Keyword And Ignore Error Get From Dictionary ${DestinationInfoDict} destinationAddIpList + Run Keyword If "${return}"=="FAIL" or "${AddList}"=="${EMPTY}" log there is no CreateSource + ... ELSE CreateDestination1 ${AddList} CreateDestination1 - [Arguments] ${addList} + [Arguments] ${AddList} [Documentation] 调用次关键字前需要添加必填参数: - ... ${type1}:填入Ip或SUBID或Geography或IPLearning + ... ${Type1}:填入Ip或SUBID或Geography或IPLearning ... ${CreateOrSearch}:填入Create或者Search ... ${Add}:填入Address或Group - ... ${name}:名称 - ... ${ip_type}:填入Ip或者Geography或者IPLearning - ... ${ipclienttext1}:填入IPV4或6的值或range的ip段 - ... ${port}:填入端口 + ... ${Name}:名称 + ... ${Ip_type}:填入Ip或者Geography或者IPLearning + ... ${Ipclienttext1}:填入IPV4或6的值或range的ip段 + ... ${Port}:填入端口 ... ${Country}:列表形式,列表中是国家名字 ... ${City}:列表形式,列表中是城市名字 ... ${Protocols1}:填入HTTP或SSL或HTTPSSL ... ${Degree}:填入1Degree或2Degree - ... ${times}:填入小时数,例如1或2 - ... ${numbers}:填入数值,例如1或10000 - ... ${limits}:填入数值,例如1或10000 - ... ${object_name}:列表形式,列表中是对象的名字 - ... ${keywordtext}:填入新建subid的内容 + ... ${Times}:填入小时数,例如1或2 + ... ${Numbers}:填入数值,例如1或10000 + ... ${Limits}:填入数值,例如1或10000 + ... ${ObjectName}:列表形式,列表中是对象的名字 + ... ${Keywordtext}:填入新建subid的内容 ... 判断新建source选择用什么样的类型数据 - ${listlenth}= Get Length ${addList} + ${listlenth}= Get Length ${AddList} #${tempValue} set Variable tempValue - #FOR ${var} IN RANGE ${addList} + #FOR ${var} IN RANGE ${AddList} FOR ${var} IN RANGE ${listlenth} log ${var} - ${tempValue} Get From List ${addList} ${var} + ${tempValue} Get From List ${AddList} ${var} Create-Destination ${tempValue} END CreateSource - [Arguments] ${addDict} - #[Arguments] ${policytype}=null ${type1}=null ${CreateOrSearch}=null ${Add}=null ${name}=null - #... ${object_name}=null ${ipclienttext1}=null ${port}=null ${Country}=null ${City}=null - #... ${Protocols1}=null ${Degree}=null ${times}=null ${numbers}=null ${limits}=null ${keywordtext}=null + [Arguments] ${AddDict} + #[Arguments] ${PolicyType}=null ${Type1}=null ${CreateOrSearch}=null ${Add}=null ${Name}=null + #... ${ObjectName}=null ${Ipclienttext1}=null ${Port}=null ${Country}=null ${City}=null + #... ${Protocols1}=null ${Degree}=null ${Times}=null ${Numbers}=null ${Limits}=null ${Keywordtext}=null [Documentation] 调用次关键字前需要添加必填参数: - ... ${policytype}:填入安全策略或管控策略或tcp策略中前置元素:安全和代理源:/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[4] 安全和代理目的:/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[5] + ... ${PolicyType}:填入安全策略或管控策略或tcp策略中前置元素:安全和代理源:/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[4] 安全和代理目的:/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[5] ... tcp源:/html/body/div[1]/div/div[3]/div[2]/div/div/div[1]/div[1]/div/div[2]/form/div[2] ... tcp目的:/html/body/div[1]/div/div[3]/div[2]/div/div/div[1]/div[1]/div/div[2]/form/div[3] - ... ${type1}:填入Ip或SUBID或Geography或IPLearning + ... ${Type1}:填入Ip或SUBID或Geography或IPLearning ... ${CreateOrSearch}:填入Create或者Search ... ${Add}:填入Address或Group - ... ${name}:名称 - ... ${ip_type}:填入Ip或者Geography或者IPLearning - ... ${ipclienttext1}:填入IPV4或6的值或range的ip段 - ... ${port}:填入端口 + ... ${Name}:名称 + ... ${Ip_type}:填入Ip或者Geography或者IPLearning + ... ${Ipclienttext1}:填入IPV4或6的值或range的ip段 + ... ${Port}:填入端口 ... ${Country}:列表形式,列表中是国家名字 ... ${City}:列表形式,列表中是城市名字 ... ${Protocols1}:填入HTTP或SSL或HTTPSSL ... ${Degree}:填入1Degree或2Degree - ... ${times}:填入小时数,例如1或2 - ... ${numbers}:填入数值,例如1或10000 - ... ${limits}:填入数值,例如1或10000 - ... ${object_name}:列表形式,列表中是对象的名字 - ... ${keywordtext}:填入新建subid的内容 + ... ${Times}:填入小时数,例如1或2 + ... ${Numbers}:填入数值,例如1或10000 + ... ${Limits}:填入数值,例如1或10000 + ... ${ObjectName}:列表形式,列表中是对象的名字 + ... ${Keywordtext}:填入新建subid的内容 ... 判断新建source选择用什么样的类型数据 #调用次关键字前需要添加必填参数: - ${return} ${sordtype} Run Keyword And Ignore Error Get From Dictionary ${addDict} sordtype - ${sordtype} Run Keyword If "${return}"=="FAIL" or "${sordtype}"=="${EMPTY}" set variable Source - ... ELSE set variable ${sordtype} - ${typepath} Run Keyword If "${sordtype}"=="Source" set variable /html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[4] + ${return} ${Sordtype} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Sordtype + ${Sordtype} Run Keyword If "${return}"=="FAIL" or "${Sordtype}"=="${EMPTY}" set variable Source + ... ELSE set variable ${Sordtype} + ${typepath} Run Keyword If "${Sordtype}"=="Source" set variable /html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[4] ... ELSE set variable /html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[5] - ${return} ${type1} Run Keyword And Ignore Error Get From Dictionary ${addDict} type1 - ${type1} Run Keyword If "${return}"=="FAIL" or "${type1}"=="${EMPTY}" set variable IP - ... ELSE set variable ${type1} - ${return} ${CreateOrSearch} Run Keyword And Ignore Error Get From Dictionary ${addDict} CreateOrSearch + ${return} ${Type1} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Type1 + ${Type1} Run Keyword If "${return}"=="FAIL" or "${Type1}"=="${EMPTY}" set variable IP + ... ELSE set variable ${Type1} + ${return} ${CreateOrSearch} Run Keyword And Ignore Error Get From Dictionary ${AddDict} CreateOrSearch ${CreateOrSearch} Run Keyword If "${return}"=="FAIL" or "${CreateOrSearch}"=="${EMPTY}" set variable Create ... ELSE set variable ${CreateOrSearch} - ${return} ${Add} Run Keyword And Ignore Error Get From Dictionary ${addDict} Add + ${return} ${Add} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Add ${Add} Run Keyword If "${return}"=="FAIL" or "${Add}"=="${EMPTY}" set variable Add ... ELSE set variable ${Add} - ${return} ${object_name} Run Keyword And Ignore Error Get From Dictionary ${addDict} object_name - ${object_name} Run Keyword If "${return}"=="FAIL" or "${object_name}"=="${EMPTY}" set variable null - ... ELSE set variable ${object_name} - ${return} ${name} Run Keyword And Ignore Error Get From Dictionary ${addDict} name - ${type1} Run Keyword If "${return}"=="FAIL" or "${type1}"=="${EMPTY}" set variable null - ... ELSE set variable ${type1} - ${return} ${ipclienttext1} Run Keyword And Ignore Error Get From Dictionary ${addDict} ipclienttext1 - ${ipclienttext1} Run Keyword If "${return}"=="FAIL" or "${ipclienttext1}"=="${EMPTY}" set variable null - ... ELSE set variable ${ipclienttext1} - ${return} ${port} Run Keyword And Ignore Error Get From Dictionary ${addDict} port - ${port} Run Keyword If "${return}"=="FAIL" or "${port}"=="${EMPTY}" set variable null - ... ELSE set variable ${port} - ${return} ${Country} Run Keyword And Ignore Error Get From Dictionary ${addDict} Country + ${return} ${ObjectName} Run Keyword And Ignore Error Get From Dictionary ${AddDict} ObjectName + ${ObjectName} Run Keyword If "${return}"=="FAIL" or "${ObjectName}"=="${EMPTY}" set variable null + ... ELSE set variable ${ObjectName} + ${return} ${Name} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Name + ${Type1} Run Keyword If "${return}"=="FAIL" or "${Type1}"=="${EMPTY}" set variable null + ... ELSE set variable ${Type1} + ${return} ${Ipclienttext1} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Ipclienttext1 + ${Ipclienttext1} Run Keyword If "${return}"=="FAIL" or "${Ipclienttext1}"=="${EMPTY}" set variable null + ... ELSE set variable ${Ipclienttext1} + ${return} ${Port} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Port + ${Port} Run Keyword If "${return}"=="FAIL" or "${Port}"=="${EMPTY}" set variable null + ... ELSE set variable ${Port} + ${return} ${Country} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Country ${Country} Run Keyword If "${return}"=="FAIL" or "${Country}"=="${EMPTY}" set variable null ... ELSE set variable ${Country} - ${return} ${City} Run Keyword And Ignore Error Get From Dictionary ${addDict} City + ${return} ${City} Run Keyword And Ignore Error Get From Dictionary ${AddDict} City ${City} Run Keyword If "${return}"=="FAIL" or "${City}"=="${EMPTY}" set variable null ... ELSE set variable ${City} - ${return} ${fqdn} Run Keyword And Ignore Error Get From Dictionary ${addDict} fqdn - ${fqdn} Run Keyword If "${return}"=="FAIL" or "${fqdn}"=="${EMPTY}" set variable null - ... ELSE set variable ${fqdn} - ${return} ${Protocols1} Run Keyword And Ignore Error Get From Dictionary ${addDict} Protocols1 + ${return} ${Fqdn} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Fqdn + ${Fqdn} Run Keyword If "${return}"=="FAIL" or "${Fqdn}"=="${EMPTY}" set variable null + ... ELSE set variable ${Fqdn} + ${return} ${Protocols1} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Protocols1 ${Protocols1} Run Keyword If "${return}"=="FAIL" or "${Protocols1}"=="${EMPTY}" set variable null ... ELSE set variable ${Protocols1} - ${return} ${Degree} Run Keyword And Ignore Error Get From Dictionary ${addDict} Degree + ${return} ${Degree} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Degree ${Degree} Run Keyword If "${return}"=="FAIL" or "${Degree}"=="${EMPTY}" set variable null ... ELSE set variable ${Degree} - ${return} ${times} Run Keyword And Ignore Error Get From Dictionary ${addDict} times - ${times} Run Keyword If "${return}"=="FAIL" or "${times}"=="${EMPTY}" set variable null - ... ELSE set variable ${times} - ${return} ${numbers} Run Keyword And Ignore Error Get From Dictionary ${addDict} numbers - ${numbers} Run Keyword If "${return}"=="FAIL" or "${numbers}"=="${EMPTY}" set variable null - ... ELSE set variable ${numbers} - ${return} ${limits} Run Keyword And Ignore Error Get From Dictionary ${addDict} limits - ${limits} Run Keyword If "${return}"=="FAIL" or "${limits}"=="${EMPTY}" set variable null - ... ELSE set variable ${limits} - ${return} ${keywordtext} Run Keyword And Ignore Error Get From Dictionary ${addDict} keywordtext - ${keywordtext} Run Keyword If "${return}"=="FAIL" or "${keywordtext}"=="${EMPTY}" set variable null - ... ELSE set variable ${keywordtext} - run keyword if "${type1}"=="Ip" run keywords sleep 2 + ${return} ${Times} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Times + ${Times} Run Keyword If "${return}"=="FAIL" or "${Times}"=="${EMPTY}" set variable null + ... ELSE set variable ${Times} + ${return} ${Numbers} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Numbers + ${Numbers} Run Keyword If "${return}"=="FAIL" or "${Numbers}"=="${EMPTY}" set variable null + ... ELSE set variable ${Numbers} + ${return} ${Limits} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Limits + ${Limits} Run Keyword If "${return}"=="FAIL" or "${Limits}"=="${EMPTY}" set variable null + ... ELSE set variable ${Limits} + ${return} ${Keywordtext} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Keywordtext + ${Keywordtext} Run Keyword If "${return}"=="FAIL" or "${Keywordtext}"=="${EMPTY}" set variable null + ... ELSE set variable ${Keywordtext} + run keyword if "${Type1}"=="Ip" run keywords sleep ${sleep} ... AND click element xpath=${typepath}/div[2]/div[1]/div[2]/div[1]/div/div/div/div[1]/div/div/div/div[1] - ... AND sleep 1 - ... AND sleep 1 - ... AND SourceIPCreateOrSearch ${typepath} ${CreateOrSearch} ${Add} ${type1} ${name} ${object_name} ${ipclienttext1} ${port} ${Country} ${City} ${fqdn} ${Protocols1} ${Degree} ${times} ${numbers} ${limits} - ... ELSE IF "${type1}"=="SUBID" run keywords sleep 2 + ... AND sleep ${sleep} + ... AND sleep ${sleep} + ... AND SourceIPCreateOrSearch ${typepath} ${CreateOrSearch} ${Add} ${Type1} ${Name} ${ObjectName} ${Ipclienttext1} ${Port} ${Country} ${City} ${Fqdn} ${Protocols1} ${Degree} ${Times} ${Numbers} ${Limits} + ... ELSE IF "${Type1}"=="SUBID" run keywords sleep ${sleep} ... AND click element xpath=${typepath}/div[2]/div[1]/div[2]/div[1]/div/div/div/div[1]/div/div/div/div[2] - ... AND sleep 1 - ... AND SUBIDCreateOrSearch ${typepath} ${CreateOrSearch} ${Add} ${name} ${keywordtext} ${object_name} - ... ELSE IF "${type1}"=="Geography" run keywords sleep 2 + ... AND sleep ${sleep} + ... AND SUBIDCreateOrSearch ${typepath} ${CreateOrSearch} ${Add} ${Name} ${Keywordtext} ${ObjectName} + ... ELSE IF "${Type1}"=="Geography" run keywords sleep ${sleep} ... AND click element xpath=${typepath}/div[2]/div[1]/div[2]/div[1]/div/div/div/div[1]/div/div/div/div[3] - ... AND sleep 1 - ... AND SourceIPCreateOrSearch ${typepath} ${CreateOrSearch} ${Add} ${type1} ${name} ${object_name} ${ipclienttext1} ${port} ${Country} ${City} ${fqdn} ${Protocols1} ${Degree} ${times} ${numbers} ${limits} - ... ELSE IF "${type1}"=="IPLearning" run keywords sleep 2 + ... AND sleep ${sleep} + ... AND SourceIPCreateOrSearch ${typepath} ${CreateOrSearch} ${Add} ${Type1} ${Name} ${ObjectName} ${Ipclienttext1} ${Port} ${Country} ${City} ${Fqdn} ${Protocols1} ${Degree} ${Times} ${Numbers} ${Limits} + ... ELSE IF "${Type1}"=="IPLearning" run keywords sleep ${sleep} ... AND click element xpath=${typepath}/div[2]/div[1]/div[2]/div[1]/div/div/div/div[1]/div/div/div/div[4] - ... AND sleep 1 - ... AND SourceIPCreateOrSearch ${typepath} ${CreateOrSearch} ${Add} ${type1} ${name} ${object_name} ${ipclienttext1} ${port} ${Country} ${City} ${fqdn} ${Protocols1} ${Degree} ${times} ${numbers} ${limits} + ... AND sleep ${sleep} + ... AND SourceIPCreateOrSearch ${typepath} ${CreateOrSearch} ${Add} ${Type1} ${Name} ${ObjectName} ${Ipclienttext1} ${Port} ${Country} ${City} ${Fqdn} ${Protocols1} ${Degree} ${Times} ${Numbers} ${Limits} Create-Destination - [Arguments] ${addDict} - # ${policytype}=null ${type1}=null ${CreateOrSearch}=null ${Add}=null ${name}=null - # ... ${object_name}=null ${ipclienttext1}=null ${port}=null ${Country}=null ${City}=null - # ... ${Protocols1}=null ${Degree}=null ${times}=null ${numbers}=null ${limits}=null ${keywordtext}=null + [Arguments] ${AddDict} + # ${PolicyType}=null ${Type1}=null ${CreateOrSearch}=null ${Add}=null ${Name}=null + # ... ${ObjectName}=null ${Ipclienttext1}=null ${Port}=null ${Country}=null ${City}=null + # ... ${Protocols1}=null ${Degree}=null ${Times}=null ${Numbers}=null ${Limits}=null ${Keywordtext}=null [Documentation] 调用次关键字前需要添加必填参数: - ... ${type1}:填入Ip或SUBID或Geography或IPLearning + ... ${Type1}:填入Ip或SUBID或Geography或IPLearning ... ${CreateOrSearch}:填入Create或者Search ... ${Add}:填入Address或Group - ... ${name}:名称 - ... ${ip_type}:填入Ip或者Geography或者IPLearning - ... ${ipclienttext1}:填入IPV4或6的值或range的ip段 - ... ${port}:填入端口 + ... ${Name}:名称 + ... ${Ip_type}:填入Ip或者Geography或者IPLearning + ... ${Ipclienttext1}:填入IPV4或6的值或range的ip段 + ... ${Port}:填入端口 ... ${Country}:列表形式,列表中是国家名字 ... ${City}:列表形式,列表中是城市名字 ... ${Protocols1}:填入HTTP或SSL或HTTPSSL ... ${Degree}:填入1Degree或2Degree - ... ${times}:填入小时数,例如1或2 - ... ${numbers}:填入数值,例如1或10000 - ... ${limits}:填入数值,例如1或10000 - ... ${object_name}:列表形式,列表中是对象的名字 - ... ${keywordtext}:填入新建subid的内容 + ... ${Times}:填入小时数,例如1或2 + ... ${Numbers}:填入数值,例如1或10000 + ... ${Limits}:填入数值,例如1或10000 + ... ${ObjectName}:列表形式,列表中是对象的名字 + ... ${Keywordtext}:填入新建subid的内容 ... 判断新建source选择用什么样的类型数据 #调用次关键字前需要添加必填参数: - ${return} ${sordtype} Run Keyword And Ignore Error Get From Dictionary ${addDict} sordtype - ${sordtype} Run Keyword If "${return}"=="FAIL" or "${sordtype}"=="${EMPTY}" set variable Source - ... ELSE set variable ${sordtype} - ${typepath} Run Keyword If "${sordtype}"=="Source" set variable /html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[4] + ${return} ${Sordtype} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Sordtype + ${Sordtype} Run Keyword If "${return}"=="FAIL" or "${Sordtype}"=="${EMPTY}" set variable Source + ... ELSE set variable ${Sordtype} + ${typepath} Run Keyword If "${Sordtype}"=="Source" set variable /html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[4] ... ELSE set variable /html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[5] - ${return} ${type1} Run Keyword And Ignore Error Get From Dictionary ${addDict} type1 - ${type1} Run Keyword If "${return}"=="FAIL" or "${type1}"=="${EMPTY}" set variable IP - ... ELSE set variable ${type1} - ${return} ${CreateOrSearch} Run Keyword And Ignore Error Get From Dictionary ${addDict} CreateOrSearch + ${return} ${Type1} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Type1 + ${Type1} Run Keyword If "${return}"=="FAIL" or "${Type1}"=="${EMPTY}" set variable IP + ... ELSE set variable ${Type1} + ${return} ${CreateOrSearch} Run Keyword And Ignore Error Get From Dictionary ${AddDict} CreateOrSearch ${CreateOrSearch} Run Keyword If "${return}"=="FAIL" or "${CreateOrSearch}"=="${EMPTY}" set variable Create ... ELSE set variable ${CreateOrSearch} - ${return} ${Add} Run Keyword And Ignore Error Get From Dictionary ${addDict} Add + ${return} ${Add} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Add ${Add} Run Keyword If "${return}"=="FAIL" or "${Add}"=="${EMPTY}" set variable Add ... ELSE set variable ${Add} - ${return} ${object_name} Run Keyword And Ignore Error Get From Dictionary ${addDict} object_name - ${object_name} Run Keyword If "${return}"=="FAIL" or "${object_name}"=="${EMPTY}" set variable null - ... ELSE set variable ${object_name} - ${return} ${name} Run Keyword And Ignore Error Get From Dictionary ${addDict} name - ${name} Run Keyword If "${return}"=="FAIL" or "${name}"=="${EMPTY}" set variable null - ... ELSE set variable ${name} - ${return} ${ipclienttext1} Run Keyword And Ignore Error Get From Dictionary ${addDict} ipclienttext1 - ${ipclienttext1} Run Keyword If "${return}"=="FAIL" or "${ipclienttext1}"=="${EMPTY}" set variable null - ... ELSE set variable ${ipclienttext1} - ${return} ${port} Run Keyword And Ignore Error Get From Dictionary ${addDict} port - ${port} Run Keyword If "${return}"=="FAIL" or "${port}"=="${EMPTY}" set variable null - ... ELSE set variable ${port} - ${return} ${Country} Run Keyword And Ignore Error Get From Dictionary ${addDict} Country + ${return} ${ObjectName} Run Keyword And Ignore Error Get From Dictionary ${AddDict} ObjectName + ${ObjectName} Run Keyword If "${return}"=="FAIL" or "${ObjectName}"=="${EMPTY}" set variable null + ... ELSE set variable ${ObjectName} + ${return} ${Name} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Name + ${Name} Run Keyword If "${return}"=="FAIL" or "${Name}"=="${EMPTY}" set variable null + ... ELSE set variable ${Name} + ${return} ${Ipclienttext1} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Ipclienttext1 + ${Ipclienttext1} Run Keyword If "${return}"=="FAIL" or "${Ipclienttext1}"=="${EMPTY}" set variable null + ... ELSE set variable ${Ipclienttext1} + ${return} ${Port} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Port + ${Port} Run Keyword If "${return}"=="FAIL" or "${Port}"=="${EMPTY}" set variable null + ... ELSE set variable ${Port} + ${return} ${Country} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Country ${Country} Run Keyword If "${return}"=="FAIL" or "${Country}"=="${EMPTY}" set variable null ... ELSE set variable ${Country} - ${return} ${City} Run Keyword And Ignore Error Get From Dictionary ${addDict} City + ${return} ${City} Run Keyword And Ignore Error Get From Dictionary ${AddDict} City ${City} Run Keyword If "${return}"=="FAIL" or "${City}"=="${EMPTY}" set variable null ... ELSE set variable ${City} - ${return} ${fqdn} Run Keyword And Ignore Error Get From Dictionary ${addDict} fqdn - ${fqdn} Run Keyword If "${return}"=="FAIL" or "${fqdn}"=="${EMPTY}" set variable null - ... ELSE set variable ${fqdn} - ${return} ${Protocols1} Run Keyword And Ignore Error Get From Dictionary ${addDict} Protocols1 + ${return} ${Fqdn} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Fqdn + ${Fqdn} Run Keyword If "${return}"=="FAIL" or "${Fqdn}"=="${EMPTY}" set variable null + ... ELSE set variable ${Fqdn} + ${return} ${Protocols1} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Protocols1 ${Protocols1} Run Keyword If "${return}"=="FAIL" or "${Protocols1}"=="${EMPTY}" set variable null ... ELSE set variable ${Protocols1} - ${return} ${Degree} Run Keyword And Ignore Error Get From Dictionary ${addDict} Degree + ${return} ${Degree} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Degree ${Degree} Run Keyword If "${return}"=="FAIL" or "${Degree}"=="${EMPTY}" set variable null ... ELSE set variable ${Degree} - ${return} ${times} Run Keyword And Ignore Error Get From Dictionary ${addDict} times - ${times} Run Keyword If "${return}"=="FAIL" or "${times}"=="${EMPTY}" set variable null - ... ELSE set variable ${times} - ${return} ${numbers} Run Keyword And Ignore Error Get From Dictionary ${addDict} numbers - ${numbers} Run Keyword If "${return}"=="FAIL" or "${numbers}"=="${EMPTY}" set variable null - ... ELSE set variable ${numbers} - ${return} ${limits} Run Keyword And Ignore Error Get From Dictionary ${addDict} limits - ${limits} Run Keyword If "${return}"=="FAIL" or "${limits}"=="${EMPTY}" set variable null - ... ELSE set variable ${limits} - run keyword if "${type1}"=="Ip" run keywords sleep ${sleep} + ${return} ${Times} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Times + ${Times} Run Keyword If "${return}"=="FAIL" or "${Times}"=="${EMPTY}" set variable null + ... ELSE set variable ${Times} + ${return} ${Numbers} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Numbers + ${Numbers} Run Keyword If "${return}"=="FAIL" or "${Numbers}"=="${EMPTY}" set variable null + ... ELSE set variable ${Numbers} + ${return} ${Limits} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Limits + ${Limits} Run Keyword If "${return}"=="FAIL" or "${Limits}"=="${EMPTY}" set variable null + ... ELSE set variable ${Limits} + run keyword if "${Type1}"=="Ip" run keywords sleep ${sleep} ... AND click element xpath=${typepath}/div[2]/div[1]/div[2]/div[1]/div/div/div/div[1]/div/div/div/div[1] ... AND sleep ${sleep} ... AND sleep ${sleep} - ... AND DestinationIPCreateOrSearch ${typepath} ${CreateOrSearch} ${Add} ${type1} ${name} ${object_name} ${ipclienttext1} ${port} ${Country} ${City} ${fqdn} ${Protocols1} ${Degree} ${times} ${numbers} ${limits} - ... ELSE IF "${type1}"=="Geography" run keywords sleep ${sleep} + ... AND DestinationIPCreateOrSearch ${typepath} ${CreateOrSearch} ${Add} ${Type1} ${Name} ${ObjectName} ${Ipclienttext1} ${Port} ${Country} ${City} ${Fqdn} ${Protocols1} ${Degree} ${Times} ${Numbers} ${Limits} + ... ELSE IF "${Type1}"=="Geography" run keywords sleep ${sleep} ... AND click element xpath=${typepath}/div[2]/div[1]/div[2]/div[1]/div/div/div/div[1]/div/div/div/div[2] ... AND sleep ${sleep} - ... AND DestinationIPCreateOrSearch ${typepath} ${CreateOrSearch} ${Add} ${type1} ${name} ${object_name} ${ipclienttext1} ${port} ${Country} ${City} ${fqdn} ${Protocols1} ${Degree} ${times} ${numbers} ${limits} - ... ELSE IF "${type1}"=="IPLearning" run keywords sleep ${sleep} + ... AND DestinationIPCreateOrSearch ${typepath} ${CreateOrSearch} ${Add} ${Type1} ${Name} ${ObjectName} ${Ipclienttext1} ${Port} ${Country} ${City} ${Fqdn} ${Protocols1} ${Degree} ${Times} ${Numbers} ${Limits} + ... ELSE IF "${Type1}"=="IPLearning" run keywords sleep ${sleep} ... AND click element xpath=${typepath}/div[2]/div[1]/div[2]/div[1]/div/div/div/div[1]/div/div/div/div[3] ... AND sleep ${sleep} - ... AND DestinationIPCreateOrSearch ${typepath} ${CreateOrSearch} ${Add} ${type1} ${name} ${object_name} ${ipclienttext1} ${port} ${Country} ${City} ${fqdn} ${Protocols1} ${Degree} ${times} ${numbers} ${limits} + ... AND DestinationIPCreateOrSearch ${typepath} ${CreateOrSearch} ${Add} ${Type1} ${Name} ${ObjectName} ${Ipclienttext1} ${Port} ${Country} ${City} ${Fqdn} ${Protocols1} ${Degree} ${Times} ${Numbers} ${Limits} CreateButton [Documentation] 点击安全策略中的Create按钮 Wait Until Element Is Enabled id=app_create - sleep 3 + sleep ${sleep} click element id=app_create Create-name - [Arguments] ${policyType} ${name} + [Arguments] ${PolicyType} ${Name} [Documentation] 输入name - sleep 2 - run keyword if "${policyType}"=="Security Policy" run keywords sleep 1 - ... AND input text id=interceptionadd_name ${name} - run keyword if "${policyType}"=="Proxy Policy" run keywords sleep 1 - ... AND input text id=manipulation_elInput_policyName ${name} + sleep ${sleep} + run keyword if "${PolicyType}"=="Security Policy" run keywords sleep ${sleep} + ... AND input text id=interceptionadd_name ${Name} + run keyword if "${PolicyType}"=="Proxy Policy" run keywords sleep ${sleep} + ... AND input text id=manipulation_elInput_policyName ${Name} Create-actions - [Arguments] ${policyType} ${action} - sleep 1 - run keyword if "${policyType}"=="Security Policy" run keywords sleep 1 - ... AND Create-Securityaction ${action} - run keyword if "${policyType}"=="Proxy Policy" run keywords sleep 1 - ... AND Create-Proxyaction ${action} + [Arguments] ${PolicyType} ${Action} + sleep ${sleep} + run keyword if "${PolicyType}"=="Security Policy" run keywords sleep ${sleep} + ... AND Create-Securityaction ${Action} + run keyword if "${PolicyType}"=="Proxy Policy" run keywords sleep ${sleep} + ... AND Create-Proxyaction ${Action} Create-Securityaction - [Arguments] ${action} + [Arguments] ${Action} [Documentation] 调用次关键字前需要添加必填参数: - ... ${action}:填入allow或deny或monitor或intercept + ... ${Action}:填入allow或deny或monitor或intercept ... 判断要创建什么动作的策略 - sleep 1 - run keyword if "${action}"=="allow" run keywords sleep 1 + sleep ${sleep} + run keyword if "${Action}"=="Allow" run keywords sleep ${sleep} ... AND click element id=security_action_allow - ... ELSE IF "${action}"=="deny" run keywords sleep 1 + ... ELSE IF "${Action}"=="Deny" run keywords sleep ${sleep} ... AND click element id=security_action_deny - ... ELSE IF "${action}"=="monitor" run keywords sleep 1 + ... ELSE IF "${Action}"=="Monitor" run keywords sleep ${sleep} ... AND click element id=security_action_monitor - ... ELSE IF "${action}"=="intercept" run keywords sleep 1 + ... ELSE IF "${Action}"=="Intercept" run keywords sleep ${sleep} ... AND click element id=security_action_intercept Create-Proxyaction - [Arguments] ${action} + [Arguments] ${Action} [Documentation] 调用次关键字前需要添加必填参数: - ... ${action}:填入allow或deny或monitor或intercept + ... ${Action}:填入allow或deny或monitor或intercept ... 判断要创建什么动作的策略 sleep ${sleep} - run keyword if "${action}"=="allow" run keywords sleep ${sleep} + run keyword if "${Action}"=="Allow" run keywords sleep ${sleep} ... AND click element id=proxyManipulationallow - ... ELSE IF "${action}"=="deny" run keywords sleep ${sleep} + ... ELSE IF "${Action}"=="Deny" run keywords sleep ${sleep} ... AND click element id=proxyManipulationdeny - ... ELSE IF "${action}"=="monitor" run keywords sleep ${sleep} + ... ELSE IF "${Action}"=="Monitor" run keywords sleep ${sleep} ... AND click element id=proxyManipulationmonitor - ... ELSE IF "${action}"=="redirect" run keywords sleep ${sleep} + ... ELSE IF "${Action}"=="Redirect" run keywords sleep ${sleep} ... AND click element id=proxyManipulationredirect - ... ELSE IF "${action}"=="replace" run keywords sleep ${sleep} + ... ELSE IF "${Action}"=="Replace" run keywords sleep ${sleep} ... AND click element id=proxyManipulationreplace - ... ELSE IF "${action}"=="hijack" run keywords sleep ${sleep} + ... ELSE IF "${Action}"=="Hijack" run keywords sleep ${sleep} ... AND click element id=proxyManipulationhijack - ... ELSE IF "${action}"=="insert" run keywords sleep ${sleep} + ... ELSE IF "${Action}"=="Insert" run keywords sleep ${sleep} ... AND click element id=proxyManipulationinsert Create-Source-Button [Documentation] 点击Source的加号 - sleep 2 + sleep ${sleep} click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[4]/div[1]/div/div Create-Destination-Button [Documentation] 点击Destination的加号 Wait Until Element Is Enabled xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[5]/div[1]/div/div 10 - sleep 2 + sleep ${sleep} click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[5]/div[1]/div/div Create-Application-Button - [Arguments] ${policyType} ${ApplicationSearchV} ${action} + [Arguments] ${PolicyType} ${ApplicationSearchV} ${Action} [Documentation] 点击Application的加号 - run keyword if "${policyType}"=="Security Policy" run keywords Wait Until Element Is Enabled id=interceptionadd_application 10 + run keyword if "${PolicyType}"=="Security Policy" run keywords Wait Until Element Is Enabled id=interceptionadd_application 10 ... AND click element id=interceptionadd_application - ... AND sleep 1 + ... AND sleep ${sleep} ... AND SecurityApplicationFor ${ApplicationSearchV} - ... AND sleep 1 - run keyword if "${policyType}"=="Proxy Policy" ProxyApplicationSearch ${action} ${ApplicationSearchV} + ... AND sleep ${sleep} + run keyword if "${PolicyType}"=="Proxy Policy" ProxyApplicationSearch ${Action} ${ApplicationSearchV} SecurityApplicationFor [Arguments] ${ApplicationSearchV} @@ -551,19 +569,19 @@ SecurityApplicationSearch [Documentation] 调用次关键字前需要添加必填参数: ... ${Application}:填入是Application的内容,例如SSL或HTTP ... 选择search对象 - sleep 1 + sleep ${sleep} input text xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[5]/div[2]/div[2]/div/div[1]/input ${Application} - sleep 1 + sleep ${sleep} press keys xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[5]/div[2]/div[2]/div/div[1]/input ENTER - sleep 1 + sleep ${sleep} click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[5]/div[2]/div[2]/div/div[3]/div/div/ul/li[1] - sleep 1 + sleep ${sleep} ProxyApplicationSearch - [Arguments] ${action} ${HttpOrDoh} + [Arguments] ${Action} ${HttpOrDoh} [Documentation] 调用次关键字前需要添加必填参数: - ... ${action}:填入是action的内容,例如redirect或deny + ... ${Action}:填入是action的内容,例如redirect或deny ... 选择search对象 - run keyword if "${action}"=="redirect" run keywords sleep ${sleep} + run keyword if "${Action}"=="redirect" run keywords sleep ${sleep} ... AND click element id=interceptionadd_application ... AND sleep ${sleep} ... AND HttpOrDoh ${HttpOrDoh} @@ -582,7 +600,7 @@ HttpOrDoh ... AND sleep ${sleep} ... AND click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[7]/div[3]/div/button Create-Filter-SecurityOrProxy - [Arguments] ${policyType} ${Application} ${addFilter} + [Arguments] ${PolicyType} ${Application} ${addFilter} [Documentation] 点击Application的加号 ${return} ${Filter} Run Keyword And Ignore Error Get From Dictionary ${addFilter} Filter ${Filter} Run Keyword If "${return}"=="FAIL" or "${Filter}"=="${EMPTY}" set variable null @@ -653,10 +671,10 @@ Create-Filter-SecurityOrProxy ${return} ${DohHostname} Run Keyword And Ignore Error Get From Dictionary ${addFilter} DohHostname ${DohHostname} Run Keyword If "${return}"=="FAIL" or "${DohHostname}"=="${EMPTY}" set variable null ... ELSE set variable ${DohHostname} - run keyword if "${policyType}"=="Security Policy" Create-SecurityFilter-judge ${Application} ${Filter} ${Hostname} ${URLname} ${Request Headername} ${Response Headername} ${Request Contentname} + run keyword if "${PolicyType}"=="Security Policy" Create-SecurityFilter-judge ${Application} ${Filter} ${Hostname} ${URLname} ${Request Headername} ${Response Headername} ${Request Contentname} ... ${Response Contentname} ${SSLSNIname} ${CNname} ${SANname} ${QNAMEname} ${Subjectname} ${MAILContentname} ${Attachment Namename} ... ${Attachment Contentname} ${Fromname} ${Toname} ${MAILAccountname} ${URIname} ${FTPContentname} ${FTPAccountname} ${QUICSNIname} - run keyword if "${policyType}"=="Proxy Policy" Create-ProxyFilter ${Application} ${Filter} ${Hostname} ${URLname} ${Request Headername} ${Response Headername} ${Request Contentname} + run keyword if "${PolicyType}"=="Proxy Policy" Create-ProxyFilter ${Application} ${Filter} ${Hostname} ${URLname} ${Request Headername} ${Response Headername} ${Request Contentname} ... ${Response Contentname} ${QNAMEname} ${DohHostname} Create-SecurityFilter-judge @@ -670,7 +688,7 @@ Create-SecurityFilter-judge ... 判断filter是否可以点击 ${class}= Get Element Attribute xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[8]/div[1]/div/div[1] class run keyword if "${class}"=="addobject addobject-long-list obj-content-null filter-width-style cursor addobject-long-list-disabled" log filter不可点击,不可添加filter - run keyword if "${class}"=="addobject addobject-long-list obj-content-null filter-width-style cursor" run keywords sleep 1 + run keyword if "${class}"=="addobject addobject-long-list obj-content-null filter-width-style cursor" run keywords sleep ${sleep} ... AND Create-SecurityFilter ${Application} ${Filter} ${Hostname} ${URLname} ${Request Headername} ${Response Headername} ${Request Contentname} ... ${Response Contentname} ${SSLSNIname} ${CNname} ${SANname} ${QNAMEname} ${Subjectname} ${MAILContentname} ${Attachment Namename} ... ${Attachment Contentname} ${Fromname} ${Toname} ${MAILAccountname} ${URIname} ${FTPContentname} ${FTPAccountname} ${QUICSNIname} @@ -684,73 +702,73 @@ Create-SecurityFilter ... ${Filter}:是一个列表,列表中填入filter类型,例如Host或URL等 ... name:各个对象名称的列表 ... 判断添加filter类型 - sleep 2 + sleep ${sleep} log ${Application} FOR ${i} IN @{Filter} - sleep 1 + sleep ${sleep} click element id=interceptionadd_add_filter - sleep 1 - run keyword if "${Application}"=="HTTP" and "${i}"=="Host" run keywords sleep 1 + sleep ${sleep} + run keyword if "${Application}"=="HTTP" and "${i}"=="Host" run keywords sleep ${sleep} ... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[1] ... AND Create-Object-Search ${Hostname} ${i} - run keyword if "${Application}"=="HTTP" and "${i}"=="URL" run keywords sleep 1 + run keyword if "${Application}"=="HTTP" and "${i}"=="URL" run keywords sleep ${sleep} ... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[2] ... AND Create-Object-Search ${URLname} ${i} - run keyword if "${Application}"=="HTTP" and "${i}"=="Request Header" run keywords sleep 1 + run keyword if "${Application}"=="HTTP" and "${i}"=="Request Header" run keywords sleep ${sleep} ... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[3] ... AND Create-Object-Search ${Request Headername} ${i} - run keyword if "${Application}"=="HTTP" and "${i}"=="Response Header" run keywords sleep 1 + run keyword if "${Application}"=="HTTP" and "${i}"=="Response Header" run keywords sleep ${sleep} ... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[4] ... AND Create-Object-Search ${Response Headername} ${i} - run keyword if "${Application}"=="HTTP" and "${i}"=="Request Content" run keywords sleep 1 + run keyword if "${Application}"=="HTTP" and "${i}"=="Request Content" run keywords sleep ${sleep} ... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[5] ... AND Create-Object-Search ${Request Contentname} ${i} - run keyword if "${Application}"=="HTTP" and "${i}"=="Response Content" run keywords sleep 1 + run keyword if "${Application}"=="HTTP" and "${i}"=="Response Content" run keywords sleep ${sleep} ... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[6] ... AND Create-Object-Search ${Response Contentname} ${i} - run keyword if "${Application}"=="SSL" and "${i}"=="SNI" run keywords sleep 1 + run keyword if "${Application}"=="SSL" and "${i}"=="SNI" run keywords sleep ${sleep} ... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[1] ... AND Create-Object-Search ${SSLSNIname} ${i} - run keyword if "${Application}"=="SSL" and "${i}"=="CN" run keywords sleep 1 + run keyword if "${Application}"=="SSL" and "${i}"=="CN" run keywords sleep ${sleep} ... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[2] ... AND Create-Object-Search ${CNname} ${i} - run keyword if "${Application}"=="SSL" and "${i}"=="SAN" run keywords sleep 1 + run keyword if "${Application}"=="SSL" and "${i}"=="SAN" run keywords sleep ${sleep} ... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[3] ... AND Create-Object-Search ${SANname} ${i} - run keyword if "${Application}"=="DNS" and "${i}"=="QNAME" run keywords sleep 1 + run keyword if "${Application}"=="DNS" and "${i}"=="QNAME" run keywords sleep ${sleep} ... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[1] ... AND Create-Object-Search ${QNAMEname} ${i} - run keyword if "${Application}"=="MAIL" and "${i}"=="Subject" run keywords sleep 1 + run keyword if "${Application}"=="MAIL" and "${i}"=="Subject" run keywords sleep ${sleep} ... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[1] ... AND Create-Object-Search ${Subjectname} ${i} - run keyword if "${Application}"=="MAIL" and "${i}"=="Content" run keywords sleep 1 + run keyword if "${Application}"=="MAIL" and "${i}"=="Content" run keywords sleep ${sleep} ... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[2] ... AND Create-Object-Search ${MAILContentname} ${i} - run keyword if "${Application}"=="MAIL" and "${i}"=="Attachment Name" run keywords sleep 1 + run keyword if "${Application}"=="MAIL" and "${i}"=="Attachment Name" run keywords sleep ${sleep} ... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[3] ... AND Create-Object-Search ${Attachment Namename} ${i} - run keyword if "${Application}"=="MAIL" and "${i}"=="Attachment Content" run keywords sleep 1 + run keyword if "${Application}"=="MAIL" and "${i}"=="Attachment Content" run keywords sleep ${sleep} ... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[4] ... AND Create-Object-Search ${Attachment Contentname} ${i} - run keyword if "${Application}"=="MAIL" and "${i}"=="From" run keywords sleep 1 + run keyword if "${Application}"=="MAIL" and "${i}"=="From" run keywords sleep ${sleep} ... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[5] ... AND Create-Object-Search ${Fromname} ${i} - run keyword if "${Application}"=="MAIL" and "${i}"=="To" run keywords sleep 1 + run keyword if "${Application}"=="MAIL" and "${i}"=="To" run keywords sleep ${sleep} ... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[6] ... AND Create-Object-Search ${Toname} ${i} - run keyword if "${Application}"=="MAIL" and "${i}"=="Account" run keywords sleep 1 + run keyword if "${Application}"=="MAIL" and "${i}"=="Account" run keywords sleep ${sleep} ... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[7] ... AND Create-Object-Search ${MAILAccountname} ${i} - run keyword if "${Application}"=="FTP" and "${i}"=="URI" run keywords sleep 1 + run keyword if "${Application}"=="FTP" and "${i}"=="URI" run keywords sleep ${sleep} ... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[1] ... AND Create-Object-Search ${URIname} ${i} - run keyword if "${Application}"=="FTP" and "${i}"=="Content" run keywords sleep 1 + run keyword if "${Application}"=="FTP" and "${i}"=="Content" run keywords sleep ${sleep} ... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[2] ... AND Create-Object-Search ${FTPContentname} ${i} - run keyword if "${Application}"=="FTP" and "${i}"=="Account" run keywords sleep 1 + run keyword if "${Application}"=="FTP" and "${i}"=="Account" run keywords sleep ${sleep} ... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[3] ... AND Create-Object-Search ${FTPAccountname} ${i} - run keyword if "${Application}"=="QUIC" and "${i}"=="SNI" run keywords sleep 1 + run keyword if "${Application}"=="QUIC" and "${i}"=="SNI" run keywords sleep ${sleep} ... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[1] ... AND Create-Object-Search ${QUICSNIname} ${i} END @@ -793,129 +811,130 @@ Create-ProxyFilter ... AND Create-Object-Search ${QNAMEname} ${i} END Deny-subaction-1 - [Arguments] ${action} ${subaction} ${subactionadd} + [Arguments] ${Action} ${subaction} ${Subactionadd} [Documentation] 调用次关键字前需要添加必填参数: - ... ${code}:填入403或404 + ... ${Code}:填入403或404 ... ${Content}:填入TEXT或Profile ... ${SearchorCreate}:填入Search或Create - ... ${block-text}:填入TEXT文本框内容 + ... ${BlockText}:填入TEXT文本框内容 ... ${ProfileName}:Profile的名字 - ... ${file}:上传文件路径 + ... ${File}:上传文件路径 ... ${QType}:填入A或AAAA ... ${Avalue}:根据${QType}填入IPV4或IPV6的值 ... ${Attl}:根据${QType}填入A的ttl值或AAAA的ttl值 ... ${CNAMEvalue}:根据${QType}填入A的CNAME的域名值或AAAA的CNAME域名值 ... ${CNAMEttl}:根据${QType}填入A的CNAME的ttl值或AAAA的CNAME的ttl值 ... 添加subaction - ${return} ${code} Run Keyword And Ignore Error Get From Dictionary ${subactionadd} code - ${code} Run Keyword If "${return}"=="FAIL" or "${code}"=="${EMPTY}" set variable null - ... ELSE set variable ${code} - ${return} ${Content} Run Keyword And Ignore Error Get From Dictionary ${subactionadd} Content + ${return} ${Code} Run Keyword And Ignore Error Get From Dictionary ${Subactionadd} Code + ${Code} Run Keyword If "${return}"=="FAIL" or "${Code}"=="${EMPTY}" set variable null + ... ELSE set variable ${Code} + ${return} ${Content} Run Keyword And Ignore Error Get From Dictionary ${Subactionadd} Content ${Content} Run Keyword If "${return}"=="FAIL" or "${Content}"=="${EMPTY}" set variable null ... ELSE set variable ${Content} - ${return} ${block-text} Run Keyword And Ignore Error Get From Dictionary ${subactionadd} block-text - ${block-text} Run Keyword If "${return}"=="FAIL" or "${block-text}"=="${EMPTY}" set variable null - ... ELSE set variable ${block-text} - ${return} ${SearchorCreate} Run Keyword And Ignore Error Get From Dictionary ${subactionadd} SearchorCreate + ${return} ${BlockText} Run Keyword And Ignore Error Get From Dictionary ${Subactionadd} BlockText + ${BlockText} Run Keyword If "${return}"=="FAIL" or "${BlockText}"=="${EMPTY}" set variable null + ... ELSE set variable ${BlockText} + ${return} ${SearchorCreate} Run Keyword And Ignore Error Get From Dictionary ${Subactionadd} SearchorCreate ${SearchorCreate} Run Keyword If "${return}"=="FAIL" or "${SearchorCreate}"=="${EMPTY}" set variable null ... ELSE set variable ${SearchorCreate} - ${return} ${ProfileName} Run Keyword And Ignore Error Get From Dictionary ${subactionadd} ProfileName + ${return} ${ProfileName} Run Keyword And Ignore Error Get From Dictionary ${Subactionadd} ProfileName ${ProfileName} Run Keyword If "${return}"=="FAIL" or "${ProfileName}"=="${EMPTY}" set variable null ... ELSE set variable ${ProfileName} - ${return} ${file} Run Keyword And Ignore Error Get From Dictionary ${subactionadd} file - ${file} Run Keyword If "${return}"=="FAIL" or "${file}"=="${EMPTY}" set variable null - ... ELSE set variable ${file} - ${return} ${QType} Run Keyword And Ignore Error Get From Dictionary ${subactionadd} QType + ${return} ${File} Run Keyword And Ignore Error Get From Dictionary ${Subactionadd} File + ${File} Run Keyword If "${return}"=="FAIL" or "${File}"=="${EMPTY}" set variable null + ... ELSE set variable ${File} + ${return} ${QType} Run Keyword And Ignore Error Get From Dictionary ${Subactionadd} QType ${QType} Run Keyword If "${return}"=="FAIL" or "${QType}"=="${EMPTY}" set variable null ... ELSE set variable ${QType} - ${return} ${Avalue} Run Keyword And Ignore Error Get From Dictionary ${subactionadd} Avalue + ${return} ${Avalue} Run Keyword And Ignore Error Get From Dictionary ${Subactionadd} Avalue ${Avalue} Run Keyword If "${return}"=="FAIL" or "${Avalue}"=="${EMPTY}" set variable null ... ELSE set variable ${Avalue} - ${return} ${Attl} Run Keyword And Ignore Error Get From Dictionary ${subactionadd} Attl + ${return} ${Attl} Run Keyword And Ignore Error Get From Dictionary ${Subactionadd} Attl ${Attl} Run Keyword If "${return}"=="FAIL" or "${Attl}"=="${EMPTY}" set variable null ... ELSE set variable ${Attl} - ${return} ${CNAMEvalue} Run Keyword And Ignore Error Get From Dictionary ${subactionadd} CNAMEvalue + ${return} ${CNAMEvalue} Run Keyword And Ignore Error Get From Dictionary ${Subactionadd} CNAMEvalue ${CNAMEvalue} Run Keyword If "${return}"=="FAIL" or "${CNAMEvalue}"=="${EMPTY}" set variable null ... ELSE set variable ${CNAMEvalue} - ${return} ${CNAMEttl} Run Keyword And Ignore Error Get From Dictionary ${subactionadd} CNAMEttl + ${return} ${CNAMEttl} Run Keyword And Ignore Error Get From Dictionary ${Subactionadd} CNAMEttl ${CNAMEttl} Run Keyword If "${return}"=="FAIL" or "${CNAMEttl}"=="${EMPTY}" set variable null ... ELSE set variable ${CNAMEttl} - run keyword if "${action}"=="deny" and "${subaction}"=="Drop" run keywords sleep 1 + run keyword if "${Action}"=="deny" and "${subaction}"=="Drop" run keywords sleep ${sleep} ... AND click element id=denyUserRegionBlock_method0 - run keyword if "${action}"=="deny" and "${subaction}"=="RST" run keywords sleep 1 + run keyword if "${Action}"=="deny" and "${subaction}"=="RST" run keywords sleep ${sleep} ... AND click element id=denyUserRegionBlock_method1 - run keyword if "${action}"=="deny" and "${subaction}"=="Block" run keywords sleep 1 + run keyword if "${Action}"=="deny" and "${subaction}"=="Block" run keywords sleep ${sleep} ... AND click element id=denyUserRegionBlock_method2 - ... AND Deny-Block ${code} ${Content} ${block-text} ${SearchorCreate} ${ProfileName} ${file} - run keyword if "${action}"=="deny" and "${subaction}"=="Alert" run keywords sleep 1 + ... AND Deny-Block ${Code} ${Content} ${BlockText} ${SearchorCreate} ${ProfileName} ${File} + run keyword if "${Action}"=="deny" and "${subaction}"=="Alert" run keywords sleep ${sleep} ... AND click element id=denyUserRegionBlock_method3 - ... AND Deny-Block ${code} ${Content} ${block-text} ${SearchorCreate} ${ProfileName} ${file} - run keyword if "${action}"=="deny" and "${subaction}"=="Redirect" run keywords sleep 1 + ... AND Deny-Block ${Code} ${Content} ${BlockText} ${SearchorCreate} ${ProfileName} ${File} + run keyword if "${Action}"=="deny" and "${subaction}"=="Redirect" run keywords sleep ${sleep} ... AND click element id=denyUserRegionBlock_method4 - ... AND sleep 1 + ... AND sleep ${sleep} ... AND click element id=interceptionadd_rightdetails - ... AND sleep 1 + ... AND sleep ${sleep} ... AND Deny-Redirect ${QType} ${Avalue} ${Attl} ${CNAMEvalue} ${CNAMEttl} Deny-Block - [Arguments] ${code} ${Content} ${block-text} ${SearchorCreate} ${ProfileName} ${file} + [Arguments] ${Code} ${Content} ${BlockText} ${SearchorCreate} ${ProfileName} ${File} [Documentation] 调用次关键字前需要添加必填参数: - ... ${code}:填入403或404 + ... ${Code}:填入403或404 ... ${Content}:填入TEXT或Profile ... ${SearchorCreate}:填入Search或Create - ... ${block-text}:填入TEXT文本框内容 + ... ${BlockText}:填入TEXT文本框内容 ... ${ProfileName}:Profile的名字 - ... ${file}:上传文件路径 + ... ${File}:上传文件路径 ... 添加block数据内容 - sleep 1 + sleep ${sleep} click element id=denyUserRegionBlock_code - run keyword if "${code}"=="403" or "${code}"=="200" run keywords sleep 1 + run keyword if "${Code}"=="403" or "${Code}"=="200" run keywords sleep ${sleep} ... AND click element id=denyUserRegionBlock_code_select0 - ... AND sleep 1 + ... AND sleep ${sleep} ... AND click element id=blockselect - ... ELSE IF "${code}"=="404" run keywords sleep 1 + ... ELSE IF "${Code}"=="404" run keywords sleep ${sleep} ... AND click element id=denyUserRegionBlock_code_select1 - ... AND sleep 1 + ... AND sleep ${sleep} ... AND click element id=blockselect - ... ELSE IF "${code}"=="204" run keywords sleep 1 + ... ELSE IF "${Code}"=="204" run keywords sleep ${sleep} ... AND click element id=denyUserRegionBlock_code_select1 - run keyword if "${Content}"=="TEXT" run keywords sleep 1 + run keyword if "${Content}"=="TEXT" run keywords sleep ${sleep} ... AND click element id=blockselect_select0 - ... AND sleep 1 - ... AND input text id=denyUserRegionBlock_message ${block-text} - ... ELSE IF "${Content}"=="Profile" run keywords sleep 1 + ... AND sleep ${sleep} + ... AND input text id=denyUserRegionBlock_message ${BlockText} + ... ELSE IF "${Content}"=="Profile" run keywords sleep ${sleep} ... AND click element id=blockselect_select1 - ... AND sleep 1 - ... AND Profile-SearchorCreate ${SearchorCreate} ${ProfileName} ${file} + ... AND sleep ${sleep} + ... AND Profile-SearchorCreate ${SearchorCreate} ${ProfileName} ${File} Profile-SearchorCreate - [Arguments] ${SearchorCreate} ${ProfileName} ${file} + [Arguments] ${SearchorCreate} ${ProfileName} ${File} [Documentation] 调用次关键字前需要添加必填参数: ... ${SearchorCreate}:填入Search或Create ... ${ProfileName}:Profile的名字 - ... ${file}:上传文件路径 + ... ${File}:上传文件路径 ... 判断是新建还是搜索profile - sleep 1 + sleep ${sleep} click element id=html_profile - sleep 1 - run keyword if "${SearchorCreate}"=="Search" run keywords sleep 1 + sleep ${sleep} + run keyword if "${SearchorCreate}"=="Search" run keywords sleep ${sleep} ... AND input text id=filedata_profileName ${ProfileName} - ... AND sleep 1 + ... AND sleep ${sleep} ... AND press keys id=filedata_profileName ENTER - ... AND sleep 1 + ... AND sleep ${sleep} ... AND click element id=filelist_select0 - ... ELSE IF "${SearchorCreate}"=="Create" run keywords sleep 1 + ... ELSE IF "${SearchorCreate}"=="Create" run keywords sleep ${sleep} ... AND click element id=interceptionadd_fileadd - ... AND sleep 1 + ... AND sleep ${sleep} ... AND input text id=responsepages_profileName ${ProfileName} - ... AND sleep 1 - ... AND Choose File xpath=//*[@id="policy_Manipulation_create6"]/div[2]/form/div[2]/div/div/div/input ${file} #上传文件 - ... AND sleep 1 + ... AND sleep ${sleep} + ... AND Choose File xpath=//*[@id="policy_Manipulation_create6"]/div[2]/form/div[2]/div/div/div/input ${File} #上传文件 + ... AND sleep ${sleep} ... AND clcik element id=responseAddOk1 ... ELSE log 传入参数错误 Deny-Redirect - [Arguments] ${QType} ${Avalue} ${Attl} ${CNAMEvalue} ${CNAMEttl} + [Arguments] ${DenyRedirectadd} +# ${QType} ${Avalue} ${Attl} ${CNAMEvalue} ${CNAMEttl} [Documentation] 调用次关键字前需要添加必填参数: ... ${QType}:填入A或AAAA ... ${Avalue}:根据${QType}填入IPV4或IPV6的值 @@ -923,41 +942,56 @@ Deny-Redirect ... ${CNAMEvalue}:根据${QType}填入A的CNAME的域名值或AAAA的CNAME域名值 ... ${CNAMEttl}:根据${QType}填入A的CNAME的ttl值或AAAA的CNAME的ttl值 ... 新建Redirect - run keyword if "${QType}"=="A" run keywords sleep 1 + ${return} ${QType} Run Keyword And Ignore Error Get From Dictionary ${${DenyRedirectadd}} QType + ${QType} Run Keyword If "${return}"=="FAIL" or "${QType}"=="${EMPTY}" set variable null + ... ELSE set variable ${QType} + ${return} ${Avalue} Run Keyword And Ignore Error Get From Dictionary ${${DenyRedirectadd}} Avalue + ${Avalue} Run Keyword If "${return}"=="FAIL" or "${Avalue}"=="${EMPTY}" set variable null + ... ELSE set variable ${Avalue} + ${return} ${Attl} Run Keyword And Ignore Error Get From Dictionary ${${DenyRedirectadd}} Attl + ${Attl} Run Keyword If "${return}"=="FAIL" or "${Attl}"=="${EMPTY}" set variable null + ... ELSE set variable ${Attl} + ${return} ${CNAMEvalue} Run Keyword And Ignore Error Get From Dictionary ${${DenyRedirectadd}} CNAMEvalue + ${CNAMEvalue} Run Keyword If "${return}"=="FAIL" or "${CNAMEvalue}"=="${EMPTY}" set variable null + ... ELSE set variable ${CNAMEvalue} + ${return} ${CNAMEttl} Run Keyword And Ignore Error Get From Dictionary ${${DenyRedirectadd}} CNAMEttl + ${CNAMEttl} Run Keyword If "${return}"=="FAIL" or "${CNAMEttl}"=="${EMPTY}" set variable null + ... ELSE set variable ${CNAMEttl} + run keyword if "${QType}"=="A" run keywords sleep ${sleep} ... AND input text id=A00 ${Avalue} - ... AND sleep 1 + ... AND sleep ${sleep} ... AND input text id=ttl00 ${Attl} - ... AND sleep 1 + ... AND sleep ${sleep} ... AND click element id=interceptionadd_addForm - ... AND sleep 1 + ... AND sleep ${sleep} ... AND input text id=Cname01 ${CNAMEvalue} - ... AND sleep 1 + ... AND sleep ${sleep} ... AND input text id=ttl01 ${CNAMEttl} - run keyword if "${QType}"=="AAAA" run keywords sleep 1 + run keyword if "${QType}"=="AAAA" run keywords sleep ${sleep} ... AND click element id=dns_qtype_radio01 ... AND input text id=AAAA00 ${Avalue} - ... AND sleep 1 + ... AND sleep ${sleep} ... AND input text id=ttl00 ${Attl} - ... AND sleep 1 + ... AND sleep ${sleep} ... AND click element id=interceptionadd_addForm - ... AND sleep 1 + ... AND sleep ${sleep} ... AND input text id=Cname01 ${CNAMEvalue} - ... AND sleep 1 + ... AND sleep ${sleep} ... AND input text id=ttl01 ${CNAMEttl} - sleep 1 + sleep ${sleep} click element id=interceptionadd_shezhidns -interceptadd +Interceptadd [Arguments] ${Keyring} ${MirrorDecryptedTrafficInfo} ${DecryptionProfile} [Documentation] 引用次关键字,填入必填参数 ... 必填参数: ... ${Keyring}:新建或替换证书的参数,字典 ... ${MirrorDecryptedTrafficInfo}:新建解密流量参数,字典 ... ${DecryptionProfile}:新建或修改属性参数,字典 - Run Keyword If "${Keyring}"=="${EMPTY}" log there is no KeyringInfo + Run Keyword If "${Keyring}"=="${EMPTY}" or "${Keyring}"=="null" log there is no KeyringInfo ... ELSE Intercept-SSL-Keyring-SearchorCreate ${Keyring} - Run Keyword If "${MirrorDecryptedTrafficInfo}"=="${EMPTY}" log there is no MirrorDecryptedTrafficInfo + Run Keyword If "${MirrorDecryptedTrafficInfo}"=="${EMPTY}" or "${MirrorDecryptedTrafficInfo}"=="null" log there is no MirrorDecryptedTrafficInfo ... ELSE Intercept-SSL-MirrorDecryptedTraffic-Open ${MirrorDecryptedTrafficInfo} - Run Keyword If "${DecryptionProfile}"=="${EMPTY}" log there is no interceptaddInfo + Run Keyword If "${DecryptionProfile}"=="${EMPTY}" or "${DecryptionProfile}"=="null" log there is no interceptaddInfo ... ELSE DecryptionProfile-SearchorCreate ${DecryptionProfile} Intercept-SSL-Keyring-SearchorCreate @@ -965,97 +999,97 @@ Intercept-SSL-Keyring-SearchorCreate [Documentation] 引用次关键字,填入必填参数 ... 必填参数: ... ${KeySearchorCreate}:填入Create或Search - ... ${name}:新建页面name输入框里的内容 - ... ${file}:上传文件所在本地的路径 - ... ${file1}:上传文件所在本地的路径 + ... ${Name}:新建页面name输入框里的内容 + ... ${File}:上传文件所在本地的路径 + ... ${File1}:上传文件所在本地的路径 ... ${ExpiryHours1or2}:根证书时间填入1:自定义定义 2:原时间 - ... ${type}:上传证书类型的元素 - ... ${type1}:上传证书加密解密算法的元素 - ... ${shift}:是否打开客户端包含证书按钮 + ... ${Type}:上传证书类型的元素 + ... ${Type1}:上传证书加密解密算法的元素 + ... ${Shift}:是否打开客户端包含证书按钮 ... ${PrivateKeyType}:私钥类型 ${return} ${KeySearchorCreate} Run Keyword And Ignore Error Get From Dictionary ${Keyring} KeySearchorCreate ${KeySearchorCreate} Run Keyword If "${return}"=="FAIL" or "${KeySearchorCreate}"=="${EMPTY}" set variable null ... ELSE set variable ${KeySearchorCreate} - ${return} ${keyname} Run Keyword And Ignore Error Get From Dictionary ${Keyring} keyname - ${keyname} Run Keyword If "${return}"=="FAIL" or "${keyname}"=="${EMPTY}" set variable null - ... ELSE set variable ${keyname} - ${return} ${file} Run Keyword And Ignore Error Get From Dictionary ${Keyring} file - ${file} Run Keyword If "${return}"=="FAIL" or "${file}"=="${EMPTY}" set variable null - ... ELSE set variable ${file} - ${return} ${file1} Run Keyword And Ignore Error Get From Dictionary ${Keyring} file1 - ${file1} Run Keyword If "${return}"=="FAIL" or "${file1}"=="${EMPTY}" set variable null - ... ELSE set variable ${file1} + ${return} ${Keyname} Run Keyword And Ignore Error Get From Dictionary ${Keyring} Keyname + ${Keyname} Run Keyword If "${return}"=="FAIL" or "${Keyname}"=="${EMPTY}" set variable null + ... ELSE set variable ${Keyname} + ${return} ${File} Run Keyword And Ignore Error Get From Dictionary ${Keyring} File + ${File} Run Keyword If "${return}"=="FAIL" or "${File}"=="${EMPTY}" set variable null + ... ELSE set variable ${File} + ${return} ${File1} Run Keyword And Ignore Error Get From Dictionary ${Keyring} File1 + ${File1} Run Keyword If "${return}"=="FAIL" or "${File1}"=="${EMPTY}" set variable null + ... ELSE set variable ${File1} ${return} ${ExpiryHours1or2} Run Keyword And Ignore Error Get From Dictionary ${Keyring} ExpiryHours1or2 ${ExpiryHours1or2} Run Keyword If "${return}"=="FAIL" or "${ExpiryHours1or2}"=="${EMPTY}" set variable null ... ELSE set variable ${ExpiryHours1or2} - ${return} ${type} Run Keyword And Ignore Error Get From Dictionary ${Keyring} type - ${type} Run Keyword If "${return}"=="FAIL" or "${type}"=="${EMPTY}" set variable null - ... ELSE set variable ${type} - ${return} ${type1} Run Keyword And Ignore Error Get From Dictionary ${Keyring} type1 - ${type1} Run Keyword If "${return}"=="FAIL" or "${type1}"=="${EMPTY}" set variable null - ... ELSE set variable ${type1} - ${return} ${shift} Run Keyword And Ignore Error Get From Dictionary ${Keyring} shift - ${shift} Run Keyword If "${return}"=="FAIL" or "${shift}"=="${EMPTY}" set variable null - ... ELSE set variable ${shift} + ${return} ${Type} Run Keyword And Ignore Error Get From Dictionary ${Keyring} Type + ${Type} Run Keyword If "${return}"=="FAIL" or "${Type}"=="${EMPTY}" set variable null + ... ELSE set variable ${Type} + ${return} ${Type1} Run Keyword And Ignore Error Get From Dictionary ${Keyring} Type1 + ${Type1} Run Keyword If "${return}"=="FAIL" or "${Type1}"=="${EMPTY}" set variable null + ... ELSE set variable ${Type1} + ${return} ${Shift} Run Keyword And Ignore Error Get From Dictionary ${Keyring} Shift + ${Shift} Run Keyword If "${return}"=="FAIL" or "${Shift}"=="${EMPTY}" set variable null + ... ELSE set variable ${Shift} ${return} ${PrivateKeyType} Run Keyword And Ignore Error Get From Dictionary ${Keyring} PrivateKeyType ${PrivateKeyType} Run Keyword If "${return}"=="FAIL" or "${PrivateKeyType}"=="${EMPTY}" set variable null ... ELSE set variable ${PrivateKeyType} - sleep 1 + sleep ${sleep} click element id=interceptionadd_eventkeying1 - sleep 1 - run keyword if "${KeySearchorCreate}"=="Create" run keywords sleep 1 + sleep ${sleep} + run keyword if "${KeySearchorCreate}"=="Create" run keywords sleep ${sleep} ... AND click element id=interceptionadd_keyadd - ... AND sleep 2 - ... AND Create-Keyring ${keyname} ${file} ${file1} ${ExpiryHours1or2} ${type} ${type1} - ... ${shift}=close ${PrivateKeyType}=PrivateKeyFile - run keyword if "${KeySearchorCreate}"=="Search" run keywords sleep 1 - ... AND input text id=card_keyringName1 ${keyname} - ... AND sleep 1 + ... AND sleep ${sleep} + ... AND Create-Keyring ${Keyname} ${File} ${File1} ${ExpiryHours1or2} ${Type} ${Type1} + ... ${Shift}=close ${PrivateKeyType}=PrivateKeyFile + run keyword if "${KeySearchorCreate}"=="Search" run keywords sleep ${sleep} + ... AND input text id=card_keyringName1 ${Keyname} + ... AND sleep ${sleep} ... AND press keys id=card_keyringName1 ENTER - ... AND sleep 1 + ... AND sleep ${sleep} ... AND clcik element id=card_keylist0 Create-Keyring - [Arguments] ${name} ${file} ${file1} ${ExpiryHours1or2} ${type} ${type1} - ... ${shift}=close ${PrivateKeyType}=PrivateKeyFile + [Arguments] ${Name} ${File} ${File1} ${ExpiryHours1or2} ${Type} ${Type1} + ... ${Shift}=close ${PrivateKeyType}=PrivateKeyFile [Documentation] 引用次关键字,填入必填参数 ... 必填参数: - ... ${name}:新建页面name输入框里的内容 - ... ${file}:上传文件所在本地的路径 - ... ${file1}:上传文件所在本地的路径 + ... ${Name}:新建页面name输入框里的内容 + ... ${File}:上传文件所在本地的路径 + ... ${File1}:上传文件所在本地的路径 ... ${ExpiryHours1or2}:根证书时间填入1:自定义定义 2:原时间 - ... ${type}:上传证书类型的元素 - ... ${type1}:上传证书加密解密算法的元素 - ... ${shift}:是否打开客户端包含证书按钮 + ... ${Type}:上传证书类型的元素 + ... ${Type1}:上传证书加密解密算法的元素 + ... ${Shift}:是否打开客户端包含证书按钮 ... ${PrivateKeyType}:私钥类型 - Sleep 2 - input id=keyringsadd_name ${name} #输入name - Sleep 2 - Choose File xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/div[2]/form/div[2]/div/div/div/input ${file} #上传文件 - Sleep 2 - Choose File xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/div[2]/form/div[3]/div/div[2]/div/div/input ${file1} #上传文件 + sleep ${sleep} + input id=keyringsadd_name ${Name} #输入name + sleep ${sleep} + Choose File xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/div[2]/form/div[2]/div/div/div/input ${File} #上传文件 + sleep ${sleep} + Choose File xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/div[2]/form/div[3]/div/div[2]/div/div/input ${File1} #上传文件 ${select} Set Variable ${ExpiryHours1or2} Run Keyword If '${select}'=='1' click element id=keyringsadd_customized Run Keyword If '${select}'=='1' input text id=reissueExpiryDate 10 - sleep 1 + sleep ${sleep} click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/div[2]/form/div[6]/div/div/div[1]/span/span/i #点击下拉框 - sleep 1 - click element ${type} #选择证书类型 - sleep 1 + sleep ${sleep} + click element ${Type} #选择证书类型 + sleep ${sleep} click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/div[2]/form/div[7]/div/div/div[1]/span/span/i #点击下拉框 - sleep 1 - click element ${type1} #选择加密解密类型 - sleep 1 - ${root} Set Variable ${shift} - run keyword if "${root}"=="open" run keywords sleep 1 + sleep ${sleep} + click element ${Type1} #选择加密解密类型 + sleep ${sleep} + ${root} Set Variable ${Shift} + run keyword if "${root}"=="open" run keywords sleep ${sleep} ... AND click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/div[2]/form/div[9]/div/div/span ... ELSE IF "${root}"=="close" log "go on" - Run Keyword If '${PrivateKeyType}'=='HSM' run keywords sleep 1 + Run Keyword If '${PrivateKeyType}'=='HSM' run keywords sleep ${sleep} ... AND click element id=privateHSM - ... AND sleep 1 + ... AND sleep ${sleep} ... AND input text id=keyringsadd_slotid 10 - sleep 1 + sleep ${sleep} click id=keyringsadd_sub #点击OK缇交 Intercept-SSL-MirrorDecryptedTraffic-Open [Arguments] ${MirrorDecryptedTrafficInfo} @@ -1064,8 +1098,8 @@ Intercept-SSL-MirrorDecryptedTraffic-Open ... ${MirrorDecryptedTraffic}:输入open代表开启按钮,其他代表不开启 ... ${MirrorDecryptedTrafficSearchorCreate}:填入Create或Search ... ${MirrorDecryptedTrafficname}:解密流量文件的name - ... ${type}:是mac还是vlan的定位元素 - ... ${shuru}:输入mac或vlan的值 + ... ${Type}:是mac还是vlan的定位元素 + ... ${Shuru}:输入mac或vlan的值 ${return} ${MirrorDecryptedTraffic} Run Keyword And Ignore Error Get From Dictionary ${MirrorDecryptedTrafficInfo} MirrorDecryptedTraffic ${MirrorDecryptedTraffic} Run Keyword If "${return}"=="FAIL" or "${MirrorDecryptedTraffic}"=="${EMPTY}" set variable null ... ELSE set variable ${MirrorDecryptedTraffic} @@ -1075,55 +1109,55 @@ Intercept-SSL-MirrorDecryptedTraffic-Open ${return} ${MirrorDecryptedTrafficname} Run Keyword And Ignore Error Get From Dictionary ${MirrorDecryptedTrafficInfo} MirrorDecryptedTrafficname ${MirrorDecryptedTrafficname} Run Keyword If "${return}"=="FAIL" or "${MirrorDecryptedTrafficname}"=="${EMPTY}" set variable null ... ELSE set variable ${MirrorDecryptedTrafficname} - ${return} ${type} Run Keyword And Ignore Error Get From Dictionary ${MirrorDecryptedTrafficInfo} type - ${type} Run Keyword If "${return}"=="FAIL" or "${type}"=="${EMPTY}" set variable null - ... ELSE set variable ${type} - ${return} ${shuru} Run Keyword And Ignore Error Get From Dictionary ${MirrorDecryptedTrafficInfo} shuru - ${shuru} Run Keyword If "${return}"=="FAIL" or "${shuru}"=="${EMPTY}" set variable null - ... ELSE set variable ${shuru} + ${return} ${Type} Run Keyword And Ignore Error Get From Dictionary ${MirrorDecryptedTrafficInfo} Type + ${Type} Run Keyword If "${return}"=="FAIL" or "${Type}"=="${EMPTY}" set variable null + ... ELSE set variable ${Type} + ${return} ${Shuru} Run Keyword And Ignore Error Get From Dictionary ${MirrorDecryptedTrafficInfo} Shuru + ${Shuru} Run Keyword If "${return}"=="FAIL" or "${Shuru}"=="${EMPTY}" set variable null + ... ELSE set variable ${Shuru} - sleep 1 - run keyword if "${MirrorDecryptedTraffic}"=="open" run keywords sleep 1 + sleep ${sleep} + run keyword if "${MirrorDecryptedTraffic}"=="open" run keywords sleep ${sleep} ... AND click element xpath=///*[@id="policy_paper_left"]/div[10]/div[2]/label[contains(text(), "Mirror Decrypted Traffic")]/following-sibling::div/div - ... AND sleep 1 + ... AND sleep ${sleep} ... AND clcik element id=mirror_profile - ... AND MirrorDecryptedTraffic-SearchorCreate ${MirrorDecryptedTrafficSearchorCreate} ${MirrorDecryptedTrafficname} ${type} ${shuru} + ... AND MirrorDecryptedTraffic-SearchorCreate ${MirrorDecryptedTrafficSearchorCreate} ${MirrorDecryptedTrafficname} ${Type} ${Shuru} ... ELSE log 不开启 MirrorDecryptedTraffic-SearchorCreate - [Arguments] ${MirrorDecryptedTrafficSearchorCreate} ${MirrorDecryptedTrafficname} ${type} ${shuru} + [Arguments] ${MirrorDecryptedTrafficSearchorCreate} ${MirrorDecryptedTrafficname} ${Type} ${Shuru} [Documentation] 引用次关键字,填入必填参数 ... 必填参数: ... ${MirrorDecryptedTrafficSearchorCreate}:填入Create或Search ... ${MirrorDecryptedTrafficname}:解密流量文件的name - ... ${type}:是mac还是vlan的定位元素 - ... ${shuru}:输入mac或vlan的值 - sleep 1 - run keyword if "${MirrorDecryptedTrafficSearchorCreate}"=="Create" run keywords sleep 1 + ... ${Type}:是mac还是vlan的定位元素 + ... ${Shuru}:输入mac或vlan的值 + sleep ${sleep} + run keyword if "${MirrorDecryptedTrafficSearchorCreate}"=="Create" run keywords sleep ${sleep} ... AND click element id=interceptionadd_trarightadd - ... AND sleep 2 - ... AND Create-MirrorDecryptedTraffic ${MirrorDecryptedTrafficname} ${type} ${shuru} - run keyword if "${MirrorDecryptedTrafficSearchorCreate}"=="Search" run keywords sleep 1 + ... AND sleep ${sleep} + ... AND Create-MirrorDecryptedTraffic ${MirrorDecryptedTrafficname} ${Type} ${Shuru} + run keyword if "${MirrorDecryptedTrafficSearchorCreate}"=="Search" run keywords sleep ${sleep} ... AND input text id=tradata_profileName ${MirrorDecryptedTrafficname} - ... AND sleep 1 + ... AND sleep ${sleep} ... AND press keys id=tradata_profileName ENTER - ... AND sleep 1 + ... AND sleep ${sleep} ... AND clcik element id=tralist_length0 Create-MirrorDecryptedTraffic - [Arguments] ${MirrorDecryptedTrafficname} ${type} ${shuru} + [Arguments] ${MirrorDecryptedTrafficname} ${Type} ${Shuru} [Documentation] 引用次关键字,填入必填参数 ... 必填参数: ... ${MirrorDecryptedTrafficname}:解密流量文件的name - ... ${type}:是mac还是vlan的定位元素 - ... ${shuru}:输入mac或vlan的值 - Sleep 2 + ... ${Type}:是mac还是vlan的定位元素 + ... ${Shuru}:输入mac或vlan的值 + sleep ${sleep} input id=trafficmirror_profileName ${MirrorDecryptedTrafficname} #输入name - Sleep 2 + sleep ${sleep} click id=addrTypeChoose #点击下拉框 - Sleep 2 - click ${type} #选择vlan或者mac - Sleep 1 - input id=trafficmirror_addrArray0 ${shuru} - sleep 2 + sleep ${sleep} + click ${Type} #选择vlan或者mac + sleep ${sleep} + input id=trafficmirror_addrArray0 ${Shuru} + sleep ${sleep} click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/button[1] #点击OK DecryptionProfile-SearchorCreate [Arguments] ${DecryptionProfile} @@ -1131,119 +1165,119 @@ DecryptionProfile-SearchorCreate ... 必填参数: ... ${DecryptionProfileSearchorCreate}:填入Create或Search ... ${DecryptionProfilename}:文件name - ... ${dict1}:是个字典,等于1为开启,等于0为关闭,例如:Common Name=1 Issuer=1 Self-signed=1 Expiry Date=1 EV Certificat=1 + ... ${Dict1}:是个字典,等于1为开启,等于0为关闭,例如:Common Name=1 Issuer=1 Self-signed=1 Expiry Date=1 EV Certificat=1 ... Certificate Transparency=1 Mutual Authentication=1 On Protocol Errors=1 Certificate Pinning=1 Certificate Not Installed=1 Mirror Client Versions=1 ... Allow HTTP/2=1 - ... ${fail1} :输入Fail-close或Pass-through - ... ${min1}:输入协议版本, - ... ${max1}:输入协议版本, + ... ${Fail1} :输入Fail-close或Pass-through + ... ${Min1}:输入协议版本, + ... ${Max1}:输入协议版本, ${return} ${DecryptionProfileSearchorCreate} Run Keyword And Ignore Error Get From Dictionary ${DecryptionProfile} DecryptionProfileSearchorCreate ${DecryptionProfileSearchorCreate} Run Keyword If "${return}"=="FAIL" or "${DecryptionProfileSearchorCreate}"=="${EMPTY}" set variable null ... ELSE set variable ${DecryptionProfileSearchorCreate} ${return} ${DecryptionProfilename} Run Keyword And Ignore Error Get From Dictionary ${DecryptionProfile} DecryptionProfilename ${DecryptionProfilename} Run Keyword If "${return}"=="FAIL" or "${DecryptionProfilename}"=="${EMPTY}" set variable null ... ELSE set variable ${DecryptionProfilename} - ${return} ${dict1} Run Keyword And Ignore Error Get From Dictionary ${DecryptionProfile} dict1 - ${dict1} Run Keyword If "${return}"=="FAIL" or "${dict1}"=="${EMPTY}" set variable null - ... ELSE set variable ${dict1} - ${return} ${fail1} Run Keyword And Ignore Error Get From Dictionary ${DecryptionProfile} fail1 - ${fail1} Run Keyword If "${return}"=="FAIL" or "${fail1}"=="${EMPTY}" set variable null - ... ELSE set variable ${fail1} - ${return} ${min1} Run Keyword And Ignore Error Get From Dictionary ${DecryptionProfile} min1 - ${min1} Run Keyword If "${return}"=="FAIL" or "${min1}"=="${EMPTY}" set variable null - ... ELSE set variable ${min1} - ${return} ${max1} Run Keyword And Ignore Error Get From Dictionary ${DecryptionProfile} max1 - ${max1} Run Keyword If "${return}"=="FAIL" or "${max1}"=="${EMPTY}" set variable null - ... ELSE set variable ${max1} - sleep 1 + ${return} ${Dict1} Run Keyword And Ignore Error Get From Dictionary ${DecryptionProfile} Dict1 + ${Dict1} Run Keyword If "${return}"=="FAIL" or "${Dict1}"=="${EMPTY}" set variable null + ... ELSE set variable ${Dict1} + ${return} ${Fail1} Run Keyword And Ignore Error Get From Dictionary ${DecryptionProfile} Fail1 + ${Fail1} Run Keyword If "${return}"=="FAIL" or "${Fail1}"=="${EMPTY}" set variable null + ... ELSE set variable ${Fail1} + ${return} ${Min1} Run Keyword And Ignore Error Get From Dictionary ${DecryptionProfile} Min1 + ${Min1} Run Keyword If "${return}"=="FAIL" or "${Min1}"=="${EMPTY}" set variable null + ... ELSE set variable ${Min1} + ${return} ${Max1} Run Keyword And Ignore Error Get From Dictionary ${DecryptionProfile} Max1 + ${Max1} Run Keyword If "${return}"=="FAIL" or "${Max1}"=="${EMPTY}" set variable null + ... ELSE set variable ${Max1} + sleep ${sleep} click element id=interceptionadd_eventkeying - sleep 1 - run keyword if "${DecryptionProfileSearchorCreate}"=="Create" run keywords sleep 1 + sleep ${sleep} + run keyword if "${DecryptionProfileSearchorCreate}"=="Create" run keywords sleep ${sleep} ... AND click element id=interceptionadd_decryptionProfileId - ... AND sleep 2 - ... AND Create-DecryptionProfile ${DecryptionProfilename} ${dict1} ${fail1} ${min1} ${max1} - run keyword if "${DecryptionProfileSearchorCreate}"=="Search" run keywords sleep 1 + ... AND sleep ${sleep} + ... AND Create-DecryptionProfile ${DecryptionProfilename} ${Dict1} ${Fail1} ${Min1} ${Max1} + run keyword if "${DecryptionProfileSearchorCreate}"=="Search" run keywords sleep ${sleep} ... AND input text id=card_keyringName ${DecryptionProfilename} - ... AND sleep 1 + ... AND sleep ${sleep} ... AND press keys id=card_keyringName ENTER - ... AND sleep 1 + ... AND sleep ${sleep} ... AND clcik element xpath=//*[@id="decryptionProfileList"]/following-sibling::li[2] Create-DecryptionProfile - [Arguments] ${name} ${dict1} ${fail1} ${min1} ${max1} - Sleep 1 - input id=insert_profileName ${name} - Sleep 1 - DecryptionProfileButtonSwitch ${dict1} //*[@id="policy_Manipulation_create8"]/div[2]/form/div/div/label[contains(text(), " ")]/following-sibling::div/div el-switch is-checked el-switch - ${fail} Set Variable ${fail1} - run keyword if "${fail}"=="Fail-close" Run Keywords sleep 1 + [Arguments] ${Name} ${Dict1} ${Fail1} ${Min1} ${Max1} + sleep ${sleep} + input id=insert_profileName ${Name} + sleep ${sleep} + DecryptionProfileButtonSwitch ${Dict1} //*[@id="policy_Manipulation_create8"]/div[2]/form/div/div/label[contains(text(), " ")]/following-sibling::div/div el-switch is-checked el-switch + ${fail} Set Variable ${Fail1} + run keyword if "${fail}"=="Fail-close" Run Keywords sleep ${sleep} ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[3]/div[5]/div/div/label[1]/span - ... ELSE IF "${fail}"=="Pass-through" Run Keywords sleep 1 + ... ELSE IF "${fail}"=="Pass-through" Run Keywords sleep ${sleep} ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[3]/div[5]/div/div/label[2]/span ... ELSE log 1111 - ${min} Set Variable ${min1} - ${max} Set Variable ${max1} - run keyword if "${min}"=="TLSv1.0" Run Keywords sleep 1 + ${min} Set Variable ${Min1} + ${max} Set Variable ${Max1} + run keyword if "${min}"=="TLSv1.0" Run Keywords sleep ${sleep} ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i - ... AND sleep 1 + ... AND sleep ${sleep} ... AND click id=pro_min1 - ... ELSE IF "${min}"=="TLSv1.1" Run Keywords sleep 1 + ... ELSE IF "${min}"=="TLSv1.1" Run Keywords sleep ${sleep} ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i - ... AND sleep 1 + ... AND sleep ${sleep} ... AND click id=pro_min2 - ... ELSE IF "${min}"=="TLSv1.2" Run Keywords sleep 1 + ... ELSE IF "${min}"=="TLSv1.2" Run Keywords sleep ${sleep} ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i - ... AND sleep 1 + ... AND sleep ${sleep} ... AND click id=pro_min3 - ... ELSE IF "${min}"=="TLSv1.3" Run Keywords sleep 1 + ... ELSE IF "${min}"=="TLSv1.3" Run Keywords sleep ${sleep} ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i - ... AND sleep 1 + ... AND sleep ${sleep} ... AND click id=pro_min4 - ... ELSE IF "${min}"=="SSLv3.0" Run Keywords sleep 1 + ... ELSE IF "${min}"=="SSLv3.0" Run Keywords sleep ${sleep} ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i - ... AND sleep 1 + ... AND sleep ${sleep} ... AND click id=pro_min0 ... ELSE log 错误 - run keyword if "${max}"=="TLSv1.0" Run Keywords sleep 1 + run keyword if "${max}"=="TLSv1.0" Run Keywords sleep ${sleep} ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i - ... AND sleep 1 + ... AND sleep ${sleep} ... AND click id=pro_max1 - ... ELSE IF "${max}"=="TLSv1.1" Run Keywords sleep 1 + ... ELSE IF "${max}"=="TLSv1.1" Run Keywords sleep ${sleep} ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i - ... AND sleep 1 + ... AND sleep ${sleep} ... AND click id=pro_max2 - ... ELSE IF "${max}"=="TLSv1.2" Run Keywords sleep 1 + ... ELSE IF "${max}"=="TLSv1.2" Run Keywords sleep ${sleep} ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i - ... AND sleep 1 + ... AND sleep ${sleep} ... AND click id=pro_max3 - ... ELSE IF "${max}"=="TLSv1.3" Run Keywords sleep 1 + ... ELSE IF "${max}"=="TLSv1.3" Run Keywords sleep ${sleep} ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i - ... AND sleep 1 + ... AND sleep ${sleep} ... AND click id=pro_max4 - ... ELSE IF "${max}"=="SSLv3.0" Run Keywords sleep 1 + ... ELSE IF "${max}"=="SSLv3.0" Run Keywords sleep ${sleep} ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i - ... AND sleep 1 + ... AND sleep ${sleep} ... AND click id=pro_max0 ... ELSE log 错误 - sleep 2 + sleep ${sleep} click id=decryption-ok - sleep 2 - Settings-Search ${name} ${search} #搜索框的关键字 - sleep 2 + sleep ${sleep} + Settings-Search ${Name} ${search} #搜索框的关键字 + sleep ${sleep} ${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} + Should Be Equal As Strings ${name1} ${Name} DecryptionProfileButtonSwitch - [Arguments] ${dict1} ${xpath1} ${xpath2} ${open} ${close} - ${dict} Set Variable ${dict1} + [Arguments] ${Dict1} ${xpath1} ${xpath2} ${open} ${close} + ${dict} Set Variable ${Dict1} FOR ${list} ${key} IN ENUMERATE @{dict} ${class}= Get Element Attribute xpath=${xpath1}${key}${xpath2} class run keyword if "${class}"=="${open}" and "${dict}[${key}]"=="1" log 默认开启,不进行操作 run keyword if "${class}"=="${open}" and "${dict}[${key}]"=="0" Run Keywords log 默认开启,但需求需要关闭,进行点击关闭按钮 - ... AND sleep 1 + ... AND sleep ${sleep} ... AND click xpath=${xpath1}${key}${xpath2}/span run keyword if "${class}"=="${close}" and "${dict}[${key}]"=="1" Run Keywords log 默认关闭,但需求需要开启,进行点击开启按钮 - ... AND sleep 1 + ... AND sleep ${sleep} ... AND click xpath=${xpath1}${key}${xpath2}/span run keyword if "${class}"=="${close}" and "${dict}[${key}]"=="0" log 默认关闭,不进行操作 END @@ -1251,289 +1285,289 @@ LogSession [Arguments] ${LogSession} [Documentation] 调用次关键字前需要添加必填参数: ... ${LogSession}:填入clcos或其他 - run keyword if "${LogSession}"=="close" run keywords sleep 1 + run keyword if "${LogSession}"=="close" run keywords sleep ${sleep} ... AND click element id=addlabel_labels_log ... ELSE log 开启日志 Enabled [Arguments] ${Enabled} [Documentation] 调用次关键字前需要添加必填参数: ... ${Enabled}:填入open或其他 - run keyword if "${Enabled}"=="open" run keywords sleep 1 + run keyword if "${Enabled}"=="open" run keywords sleep ${sleep} ... AND click element xpath=//*[@id="policy_paper_left"]/div/label[contains(text(), "Enabled")]/following-sibling::div/div - ... AND sleep 2 + ... AND sleep ${sleep} ... AND click element xpath=/html/body/div/div/div[3]/button[2] ... ELSE log 开启日志 Security-Policies-OK - sleep 1 + sleep ${sleep} click element id=interceptionadd_sub Create-Object-Search - [Arguments] ${name} ${filter} + [Arguments] ${Name} ${filter} [Documentation] 调用次关键字前需要添加必填参数: - ... ${name}:填入是一个列表,列表内容为object的name + ... ${Name}:填入是一个列表,列表内容为object的name ... 选择search对象 - sleep 1 + sleep ${sleep} click element xpath=//*[@id="policy_paper_left"]/div[8]/div/div[1]/label[contains(text(), "${filter}")]/following-sibling::div/div - sleep 1 + sleep ${sleep} FOR ${i} IN @{name} input text xpath=//*[@id="condistions_protocol"]/div[2]/p[contains(text(), "${filter}")]/following-sibling::div[2]/div/div[1]/input ${i} - sleep 1 + sleep ${sleep} press keys xpath=//*[@id="condistions_protocol"]/div[2]/p[contains(text(), "${filter}")]/following-sibling::div[2]/div/div[1]/input ENTER - sleep 1 + sleep ${sleep} click element xpath=//*[@id="condistions_protocol"]/div[2]/p[contains(text(), "${filter}")]/following-sibling::div[2]/div/div[2]/div/div/ul/li[1] - sleep 1 + sleep ${sleep} END SourceIPCreateOrSearch - [Arguments] ${policytype} ${CreateOrSearch} ${Add} ${ip_type} ${name} ${object_name} ${ipclienttext1} - ... ${port} ${Country} ${City} ${fqdn} ${Protocols1} ${Degree} ${times} ${numbers} ${limits} + [Arguments] ${PolicyType} ${CreateOrSearch} ${Add} ${Ip_type} ${Name} ${ObjectName} ${Ipclienttext1} + ... ${Port} ${Country} ${City} ${Fqdn} ${Protocols1} ${Degree} ${Times} ${Numbers} ${Limits} [Documentation] 调用次关键字前需要添加必填参数: ... ${CreateOrSearch}:填入Create或者Search ... ${Add}:填入Address或Group - ... ${name}:名称 - ... ${ip_type}:填入Ip或者Geography或者IPLearning - ... ${ipclienttext1}:填入IPV4或6的值或range的ip段 - ... ${port}:填入端口 + ... ${Name}:名称 + ... ${Ip_type}:填入Ip或者Geography或者IPLearning + ... ${Ipclienttext1}:填入IPV4或6的值或range的ip段 + ... ${Port}:填入端口 ... ${Country}:列表形式,列表中是国家名字 ... ${City}:列表形式,列表中是城市名字 ... ${Protocols1}:填入HTTP或SSL或HTTPSSL ... ${Degree}:填入1Degree或2Degree - ... ${times}:填入小时数,例如1或2 - ... ${numbers}:填入数值,例如1或10000 - ... ${limits}:填入数值,例如1或10000 - ... ${object_name}:列表形式,列表中是对象的名字 + ... ${Times}:填入小时数,例如1或2 + ... ${Numbers}:填入数值,例如1或10000 + ... ${Limits}:填入数值,例如1或10000 + ... ${ObjectName}:列表形式,列表中是对象的名字 ... 判断是新建ip还是搜索添加ip run keyword if "${CreateOrSearch}"=="Create" run keywords sleep ${sleep} ... AND click element id=interceptionadd_proaddaddSource - ... AND SourceIPAdd ${policytype} ${Add} ${ip_type} ${name} ${object_name} ${ipclienttext1} ${port} ${Country} ${City} ${fqdn} ${Protocols1} ${Degree} ${times} ${numbers} ${limits} + ... AND SourceIPAdd ${PolicyType} ${Add} ${Ip_type} ${Name} ${ObjectName} ${Ipclienttext1} ${Port} ${Country} ${City} ${Fqdn} ${Protocols1} ${Degree} ${Times} ${Numbers} ${Limits} ... ELSE IF "${CreateOrSearch}"=="Search" run keywords sleep ${sleep} - ... AND SourceSearch ${policytype} ${object_name} + ... AND SourceSearch ${PolicyType} ${ObjectName} SUBIDCreateOrSearch - [Arguments] ${policytype} ${CreateOrSearch} ${Add} ${name} ${keywordtext} ${object_name} + [Arguments] ${PolicyType} ${CreateOrSearch} ${Add} ${Name} ${Keywordtext} ${ObjectName} [Documentation] 调用次关键字前需要添加必填参数: ... ${CreateOrSearch}:填入Create或者Search - ... ${name}:名称 - ... ${keywordtext}:填入新建subid的内容 - ... ${object_name}:列表形式,列表中是对象的名字 + ... ${Name}:名称 + ... ${Keywordtext}:填入新建subid的内容 + ... ${ObjectName}:列表形式,列表中是对象的名字 ... 判断是新建subid还是搜索添加subid run keyword if "${CreateOrSearch}"=="Create" run keywords sleep ${sleep} ... AND click element id=interceptionadd_proaddaddSource - ... AND SUBIDAdd ${policytype} ${Add} ${name} ${keywordtext} ${object_name} + ... AND SUBIDAdd ${PolicyType} ${Add} ${Name} ${Keywordtext} ${ObjectName} ... ELSE IF "${CreateOrSearch}"=="Search" run keywords sleep ${sleep} - ... AND SourceSearch ${policytype} ${object_name} + ... AND SourceSearch ${PolicyType} ${ObjectName} DestinationIPCreateOrSearch - [Arguments] ${policytype} ${CreateOrSearch} ${Add} ${ip_type} ${name} ${object_name} ${ipclienttext1} - ... ${port} ${Country} ${City} ${fqdn} ${Protocols1} ${Degree} ${times} ${numbers} ${limits} + [Arguments] ${PolicyType} ${CreateOrSearch} ${Add} ${Ip_type} ${Name} ${ObjectName} ${Ipclienttext1} + ... ${Port} ${Country} ${City} ${Fqdn} ${Protocols1} ${Degree} ${Times} ${Numbers} ${Limits} [Documentation] 调用次关键字前需要添加必填参数: ... ${CreateOrSearch}:填入Create或者Search ... ${Add}:填入Address或Group - ... ${name}:名称 - ... ${ip_type}:填入Ip或者Geography或者IPLearning - ... ${ipclienttext1}:填入IPV4或6的值或range的ip段 - ... ${port}:填入端口 + ... ${Name}:名称 + ... ${Ip_type}:填入Ip或者Geography或者IPLearning + ... ${Ipclienttext1}:填入IPV4或6的值或range的ip段 + ... ${Port}:填入端口 ... ${Country}:列表形式,列表中是国家名字 ... ${City}:列表形式,列表中是城市名字 ... ${Protocols1}:填入HTTP或SSL或HTTPSSL ... ${Degree}:填入1Degree或2Degree - ... ${times}:填入小时数,例如1或2 - ... ${numbers}:填入数值,例如1或10000 - ... ${limits}:填入数值,例如1或10000 - ... ${object_name}:列表形式,列表中是对象的名字 + ... ${Times}:填入小时数,例如1或2 + ... ${Numbers}:填入数值,例如1或10000 + ... ${Limits}:填入数值,例如1或10000 + ... ${ObjectName}:列表形式,列表中是对象的名字 ... 判断是新建ip还是搜索添加ip run keyword if "${CreateOrSearch}"=="Create" run keywords sleep ${sleep} ... AND click element id=interceptionadd_proaddaddDestination - ... AND DestinationIPAdd ${policytype} ${Add} ${ip_type} ${name} ${object_name} ${ipclienttext1} ${port} ${Country} ${City} ${fqdn} ${Protocols1} ${Degree} ${times} ${numbers} ${limits} + ... AND DestinationIPAdd ${PolicyType} ${Add} ${Ip_type} ${Name} ${ObjectName} ${Ipclienttext1} ${Port} ${Country} ${City} ${Fqdn} ${Protocols1} ${Degree} ${Times} ${Numbers} ${Limits} ... ELSE IF "${CreateOrSearch}"=="Search" run keywords sleep ${sleep} - ... AND DestinationSearch ${policytype} ${object_name} + ... AND DestinationSearch ${PolicyType} ${ObjectName} SourceSearch - [Arguments] ${policytype} ${name} + [Arguments] ${PolicyType} ${Name} [Documentation] 调用次关键字前需要添加必填参数: - ... ${name}:填入是一个列表,列表内容为source的name + ... ${Name}:填入是一个列表,列表内容为source的name ... 选择search对象 FOR ${i} IN @{name} - input text xpath=${policytype}/div[2]/div[1]/div[2]/div[2]/div/div[1]/input ${i} + input text xpath=${PolicyType}/div[2]/div[1]/div[2]/div[2]/div/div[1]/input ${i} sleep ${sleep} - press keys xpath=${policytype}/div[2]/div[1]/div[2]/div[2]/div/div[1]/input ENTER + press keys xpath=${PolicyType}/div[2]/div[1]/div[2]/div[2]/div/div[1]/input ENTER sleep ${sleep} - click element xpath=${policytype}/div[2]/div[1]/div[2]/div[2]/div/div[2]/div/div/ul/li[1] + click element xpath=${PolicyType}/div[2]/div[1]/div[2]/div[2]/div/div[2]/div/div/ul/li[1] sleep ${sleep} END DestinationSearch - [Arguments] ${policytype} ${name} + [Arguments] ${PolicyType} ${Name} [Documentation] 调用次关键字前需要添加必填参数: - ... ${name}:填入是一个列表,列表内容为source的name + ... ${Name}:填入是一个列表,列表内容为source的name ... 选择search对象 FOR ${i} IN @{name} - input text xpath=${policytype}/div[2]/div[1]/div[2]/div[2]/div/div[1]/input ${i} + input text xpath=${PolicyType}/div[2]/div[1]/div[2]/div[2]/div/div[1]/input ${i} sleep ${sleep} - press keys xpath=${policytype}/div[2]/div[1]/div[2]/div[2]/div/div[1]/input ENTER + press keys xpath=${PolicyType}/div[2]/div[1]/div[2]/div[2]/div/div[1]/input ENTER sleep ${sleep} - click element xpath=${policytype}/div[2]/div[1]/div[2]/div[2]/div/div[2]/div/div/ul/li[1] + click element xpath=${PolicyType}/div[2]/div[1]/div[2]/div[2]/div/div[2]/div/div/ul/li[1] sleep ${sleep} END SUBIDAdd - [Arguments] ${policytype} ${Add} ${name} ${keywordtext} ${object_name} + [Arguments] ${PolicyType} ${Add} ${Name} ${Keywordtext} ${ObjectName} [Documentation] 调用次关键字前需要添加必填参数: ... ${Add}:填入Address或Group - ... ${name}:名称 - ... ${keywordtext}:填入新建subid的内容 - ... ${object_name}:列表形式,列表中是对象的名字 + ... ${Name}:名称 + ... ${Keywordtext}:填入新建subid的内容 + ... ${ObjectName}:列表形式,列表中是对象的名字 ... 判断是新建subid还是新建subid分组 run keyword if "${Add}"=="Address" run keywords sleep ${sleep} ... AND click element xpath=/html/body/ul/li[1] ... AND sleep ${sleep} - ... AND SUBAddress ${policytype} ${name} ${keywordtext} + ... AND SUBAddress ${PolicyType} ${Name} ${Keywordtext} ... ELSE IF "${Add}"=="Group" run keywords sleep ${sleep} ... AND click element xpath=/html/body/ul/li[2] ... AND sleep ${sleep} - ... AND SUBGroupAdd ${policytype} ${name} ${object_name} + ... AND SUBGroupAdd ${PolicyType} ${Name} ${ObjectName} SUBAddress - [Arguments] ${policytype} ${name} ${keywordtext} + [Arguments] ${PolicyType} ${Name} ${Keywordtext} [Documentation] 调用次关键字前需要添加必填参数: - ... ${name}:名称 - ... ${keywordtext}:填入新建subid的内容 + ... ${Name}:名称 + ... ${Keywordtext}:填入新建subid的内容 ... 新建subid - SourceCreate-name ${name} - click element xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[3]/div/div[1] + SourceCreate-name ${Name} + click element xpath=${PolicyType}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[3]/div/div[1] sleep ${sleep} - Create-SubscriberID-text ${keywordtext} + Create-SubscriberID-text ${Keywordtext} sleep ${sleep} - click element xpath=${policytype}/div[2]/div[2]/div/div[2]/button[1] + click element xpath=${PolicyType}/div[2]/div[2]/div/div[2]/button[1] SUBGroupAdd - [Arguments] ${policytype} ${name} ${object_name} + [Arguments] ${PolicyType} ${Name} ${ObjectName} [Documentation] 调用次关键字前需要添加必填参数: - ... ${name}:名称 - ... ${object_name}:列表形式,列表中是对象的名字 + ... ${Name}:名称 + ... ${ObjectName}:列表形式,列表中是对象的名字 ... 新建subid分组 - SourceCreate-name ${name} - click element xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[3]/div/div/div[2] + SourceCreate-name ${Name} + click element xpath=${PolicyType}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[3]/div/div/div[2] sleep ${sleep} - Create-Sub-Objects ${object_name} - click element xpath=${policytype}/div[2]/div[2]/div/div[2]/button[1] + Create-Sub-Objects ${ObjectName} + click element xpath=${PolicyType}/div[2]/div[2]/div/div[2]/button[1] SourceIPAdd - [Arguments] ${policytype} ${Add} ${ip_type} ${name} ${object_name} ${ipclienttext1} ${port} ${Country} ${City} ${fqdn} ${Protocols1} ${Degree} ${times} ${numbers} ${limits} + [Arguments] ${PolicyType} ${Add} ${Ip_type} ${Name} ${ObjectName} ${Ipclienttext1} ${Port} ${Country} ${City} ${Fqdn} ${Protocols1} ${Degree} ${Times} ${Numbers} ${Limits} [Documentation] 调用次关键字前需要添加必填参数: ... ${Add}:填入Address或Group - ... ${ip_type}:填入IP或者Geography或者IPLearning + ... ${Ip_type}:填入IP或者Geography或者IPLearning ... 判断是新建ip还是新建ip分组 run keyword if "${Add}"=="Address" run keywords sleep ${sleep} ... AND click element xpath=/html/body/ul/li[1] ... AND sleep ${sleep} - ... AND SourceIPAddress ${policytype} ${name} ${ip_type} ${ipclienttext1} ${port} ${Country} ${City} ${fqdn} ${Protocols1} ${Degree} ${times} ${numbers} ${limits} + ... AND SourceIPAddress ${PolicyType} ${Name} ${Ip_type} ${Ipclienttext1} ${Port} ${Country} ${City} ${Fqdn} ${Protocols1} ${Degree} ${Times} ${Numbers} ${Limits} ... ELSE IF "${Add}"=="Group" run keywords sleep ${sleep} ... AND click element xpath=/html/body/ul/li[2] ... AND sleep ${sleep} - ... AND SourceIPGroupAdd ${policytype} ${name} ${ip_type} ${object_name} + ... AND SourceIPGroupAdd ${PolicyType} ${Name} ${Ip_type} ${ObjectName} SourceIPAddress - [Arguments] ${policytype} ${name} ${ip_type} ${ipclienttext1} ${port} ${Country} ${City} ${fqdn} ${Protocols1} ${Degree} ${times} ${numbers} ${limits} + [Arguments] ${PolicyType} ${Name} ${Ip_type} ${Ipclienttext1} ${Port} ${Country} ${City} ${Fqdn} ${Protocols1} ${Degree} ${Times} ${Numbers} ${Limits} [Documentation] 调用次关键字前需要添加必填参数: - ... ${name}:名称 - ... ${ip_type}:填入Ip或者Geography或者IPLearning - ... ${ipclienttext1}:填入IPV4或6的值或range的ip段 - ... ${port}:填入端口 + ... ${Name}:名称 + ... ${Ip_type}:填入Ip或者Geography或者IPLearning + ... ${Ipclienttext1}:填入IPV4或6的值或range的ip段 + ... ${Port}:填入端口 ... ${Country}:列表形式,列表中是国家名字 ... ${City}:列表形式,列表中是城市名字 ... ${Protocols1}:填入HTTP或SSL或HTTPSSL ... ${Degree}:填入1Degree或2Degree - ... ${times}:填入小时数,例如1或2 - ... ${numbers}:填入数值,例如1或10000 - ... ${limits}:填入数值,例如1或10000 + ... ${Times}:填入小时数,例如1或2 + ... ${Numbers}:填入数值,例如1或10000 + ... ${Limits}:填入数值,例如1或10000 ... 判断 新建选择用什么样的类型,并进行新建 - SourceCreate-name ${name} + SourceCreate-name ${Name} sleep ${sleep} - run keyword if "${ip_type}"=="Ip" run keywords click element xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div[1] + run keyword if "${Ip_type}"=="Ip" run keywords click element xpath=${PolicyType}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div[1] ... AND sleep ${sleep} - ... AND NewObject.Create-ip-ClientIP-text ${ipclienttext1} ${port} - run keyword if "${ip_type}"=="Geography" run keywords click element xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[3]/div/div/label[2] + ... AND NewObject.Create-ip-ClientIP-text ${Ipclienttext1} ${Port} + run keyword if "${Ip_type}"=="Geography" run keywords click element xpath=${PolicyType}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[3]/div/div/label[2] ... AND sleep ${sleep} - ... AND click element xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div[1]/div[2] + ... AND click element xpath=${PolicyType}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div[1]/div[2] ... AND sleep ${sleep} ... AND NewObject.Create-Geography ${Country} ${City} ... AND sleep ${sleep} - ... AND click element xpath=${policytype}/div[2]/div[2]/div/div[1]/div[10]/div/div/div/div[4]/button + ... AND click element xpath=${PolicyType}/div[2]/div[2]/div/div[1]/div[10]/div/div/div/div[4]/button ... AND sleep ${sleep} - run keyword if "${ip_type}"=="IPLearning" run keywords click element xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[3]/div/div/label[3] + run keyword if "${Ip_type}"=="IPLearning" run keywords click element xpath=${PolicyType}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[3]/div/div/label[3] ... AND sleep ${sleep} - ... AND click element xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div[1] + ... AND click element xpath=${PolicyType}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div[1] ... AND sleep ${sleep} - ... AND input text xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div[3]/div/div[1]/div[2]/div[1]/div[1]/form/div[1]/div/div[1]/input ${fqdn} + ... AND input text xpath=${PolicyType}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div[3]/div/div[1]/div[2]/div[1]/div[1]/form/div[1]/div/div[1]/input ${Fqdn} ... AND sleep ${sleep} ... AND click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[5]/div[1]/div/div/div[2] ... AND sleep ${sleep} ... AND UIPolicy.Learn-From-Protocols ${Protocols1} - ... AND UIPolicy.Learning-Depth ${policytype} ${Degree} + ... AND UIPolicy.Learning-Depth ${PolicyType} ${Degree} ... AND sleep ${sleep} - ... AND input text xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[5]/div[3]/div/div[1]/input ${times} + ... AND input text xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[5]/div[3]/div/div[1]/input ${Times} ... AND sleep ${sleep} - ... AND input text xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[5]/div[4]/div/div[1]/input ${numbers} + ... AND input text xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[5]/div[4]/div/div[1]/input ${Numbers} ... AND sleep ${sleep} - ... AND input text xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[5]/div[5]/div/div[1]/input ${limits} + ... AND input text xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[5]/div[5]/div/div[1]/input ${Limits} ... AND sleep ${sleep} sleep ${sleep} SourceCreate-ok DestinationIPAdd - [Arguments] ${policytype} ${Add} ${ip_type} ${name} ${object_name} ${ipclienttext1} ${port} ${Country} ${City} ${fqdn} ${Protocols1} ${Degree} ${times} ${numbers} ${limits} + [Arguments] ${PolicyType} ${Add} ${Ip_type} ${Name} ${ObjectName} ${Ipclienttext1} ${Port} ${Country} ${City} ${Fqdn} ${Protocols1} ${Degree} ${Times} ${Numbers} ${Limits} [Documentation] 调用次关键字前需要添加必填参数: ... ${Add}:填入Address或Group - ... ${ip_type}:填入IP或者Geography或者IPLearning + ... ${Ip_type}:填入IP或者Geography或者IPLearning ... 判断是新建ip还是新建ip分组 run keyword if "${Add}"=="Address" run keywords sleep ${sleep} ... AND click element xpath=/html/body/ul[contains(@id,'dropdown-menu' )and @x-placement='bottom-start']/child::li[1] ... AND sleep ${sleep} - ... AND DestinationIPAddress ${policytype} ${name} ${ip_type} ${ipclienttext1} ${port} ${Country} ${City} ${fqdn} ${Protocols1} ${Degree} ${times} ${numbers} ${limits} + ... AND DestinationIPAddress ${PolicyType} ${Name} ${Ip_type} ${Ipclienttext1} ${Port} ${Country} ${City} ${Fqdn} ${Protocols1} ${Degree} ${Times} ${Numbers} ${Limits} ... ELSE IF "${Add}"=="Group" run keywords sleep ${sleep} ... AND click element xpath=/html/body/ul[contains(@id,'dropdown-menu' )and @x-placement='bottom-start']/child::li[2] ... AND sleep ${sleep} - ... AND DestinationIPGroupAdd ${policytype} ${name} ${ip_type} ${object_name} + ... AND DestinationIPGroupAdd ${PolicyType} ${Name} ${Ip_type} ${ObjectName} DestinationIPAddress - [Arguments] ${policytype} ${name} ${ip_type} ${ipclienttext1} ${port} ${Country} ${City} ${fqdn} ${Protocols1} ${Degree} ${times} ${numbers} ${limits} + [Arguments] ${PolicyType} ${Name} ${Ip_type} ${Ipclienttext1} ${Port} ${Country} ${City} ${Fqdn} ${Protocols1} ${Degree} ${Times} ${Numbers} ${Limits} [Documentation] 调用次关键字前需要添加必填参数: - ... ${name}:名称 - ... ${ip_type}:填入Ip或者Geography或者IPLearning - ... ${ipclienttext1}:填入IPV4或6的值或range的ip段 - ... ${port}:填入端口 + ... ${Name}:名称 + ... ${Ip_type}:填入Ip或者Geography或者IPLearning + ... ${Ipclienttext1}:填入IPV4或6的值或range的ip段 + ... ${Port}:填入端口 ... ${Country}:列表形式,列表中是国家名字 ... ${City}:列表形式,列表中是城市名字 ... ${Protocols1}:填入HTTP或SSL或HTTPSSL ... ${Degree}:填入1Degree或2Degree - ... ${times}:填入小时数,例如1或2 - ... ${numbers}:填入数值,例如1或10000 - ... ${limits}:填入数值,例如1或10000 + ... ${Times}:填入小时数,例如1或2 + ... ${Numbers}:填入数值,例如1或10000 + ... ${Limits}:填入数值,例如1或10000 ... 判断 新建选择用什么样的类型,并进行新建 - DestinationCreate-name ${policytype} ${name} + DestinationCreate-name ${PolicyType} ${Name} sleep ${sleep} - run keyword if "${ip_type}"=="Ip" run keywords click element xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div[1] + run keyword if "${Ip_type}"=="Ip" run keywords click element xpath=${PolicyType}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div[1] ... AND sleep ${sleep} - ... AND NewObject.Create-ip-ClientIP-text ${ipclienttext1} ${port} - run keyword if "${ip_type}"=="Geography" run keywords click element xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[3]/div/div/label[2] + ... AND NewObject.Create-ip-ClientIP-text ${Ipclienttext1} ${Port} + run keyword if "${Ip_type}"=="Geography" run keywords click element xpath=${PolicyType}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[3]/div/div/label[2] ... AND sleep ${sleep} - ... AND click element xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div[1]/div[2] + ... AND click element xpath=${PolicyType}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div[1]/div[2] ... AND sleep ${sleep} ... AND NewObject.Create-Geography ${Country} ${City} ... AND sleep ${sleep} ... AND click element id=interceptionadd_allcancelobjec3t ... AND sleep ${sleep} - run keyword if "${ip_type}"=="IPLearning" run keywords click element xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[3]/div/div/label[3] + run keyword if "${Ip_type}"=="IPLearning" run keywords click element xpath=${PolicyType}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[3]/div/div/label[3] ... AND sleep ${sleep} - ... AND click element xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div[1] + ... AND click element xpath=${PolicyType}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div[1] ... AND sleep ${sleep} - ... AND input text xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div[3]/div/div[1]/div[2]/div[1]/div[1]/form/div[1]/div/div[1]/input ${fqdn} + ... AND input text xpath=${PolicyType}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div[3]/div/div[1]/div[2]/div[1]/div[1]/form/div[1]/div/div[1]/input ${Fqdn} ... AND sleep ${sleep} - ... AND click element xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[5]/div[1]/div/div/div[2] + ... AND click element xpath=${PolicyType}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[5]/div[1]/div/div/div[2] ... AND sleep ${sleep} ... AND UIPolicy.Learn-From-Protocols ${Protocols1} - ... AND UIPolicy.Learning-Depth ${policytype} ${Degree} + ... AND UIPolicy.Learning-Depth ${PolicyType} ${Degree} ... AND sleep ${sleep} - ... AND input text xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[5]/div[3]/div/div[1]/input ${times} + ... AND input text xpath=${PolicyType}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[5]/div[3]/div/div[1]/input ${Times} ... AND sleep ${sleep} - ... AND input text xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[5]/div[4]/div/div[1]/input ${numbers} + ... AND input text xpath=${PolicyType}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[5]/div[4]/div/div[1]/input ${Numbers} ... AND sleep ${sleep} - ... AND input text xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[5]/div[5]/div/div[1]/input ${limits} + ... AND input text xpath=${PolicyType}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[5]/div[5]/div/div[1]/input ${Limits} ... AND sleep ${sleep} - DestinationCreate-ok ${policytype} + DestinationCreate-ok ${PolicyType} Learn-From-Protocols [Arguments] ${Protocols1} [Documentation] 调用次关键字前需要添加必填参数: @@ -1549,192 +1583,203 @@ Learn-From-Protocols ... AND click element xpath=/html/body/div/div[1]/div[1]/ul/li[2] Learning-Depth - [Arguments] ${policytype} ${Degree} + [Arguments] ${PolicyType} ${Degree} [Documentation] 调用次关键字前需要添加必填参数: ... ${Degree}:填入1Degree或2Degree ... 判断是用1Degree或2Degree run keyword if "${Degree}"=="1Degree" run keywords sleep ${sleep} - ... AND click element xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[5]/div[2]/div/div/label[1] + ... AND click element xpath=${PolicyType}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[5]/div[2]/div/div/label[1] run keyword if "${Degree}"=="2Degree" run keywords sleep ${sleep} - ... AND click element xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[5]/div[2]/div/div/label[2] + ... AND click element xpath=${PolicyType}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[5]/div[2]/div/div/label[2] SourceIPGroupAdd - [Arguments] ${policytype} ${name} ${ip_type} ${object_name} + [Arguments] ${PolicyType} ${Name} ${Ip_type} ${ObjectName} [Documentation] 调用次关键字前需要添加必填参数: - ... ${name}:名称 - ... ${ip_type}:填入Ip或者Geography - ... ${object_name}:列表形式,列表中是对象的名字 - SourceCreate-name ${name} - Select-ip_type ${ip_type} + ... ${Name}:名称 + ... ${Ip_type}:填入Ip或者Geography + ... ${ObjectName}:列表形式,列表中是对象的名字 + SourceCreate-name ${Name} + Select-ip_type ${Ip_type} sleep ${sleep} - click element xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div/div[2] - Create-Sub-Objects ${object_name} + click element xpath=${PolicyType}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div/div[2] + Create-Sub-Objects ${ObjectName} NewObject.Create-ok DestinationIPGroupAdd - [Arguments] ${policytype} ${name} ${ip_type} ${object_name} + [Arguments] ${PolicyType} ${Name} ${Ip_type} ${ObjectName} [Documentation] 调用次关键字前需要添加必填参数: - ... ${name}:名称 - ... ${ip_type}:填入Ip或者Geography - ... ${object_name}:列表形式,列表中是对象的名字 - SourceCreate-name ${name} - Select-ip_type ${ip_type} + ... ${Name}:名称 + ... ${Ip_type}:填入Ip或者Geography + ... ${ObjectName}:列表形式,列表中是对象的名字 + SourceCreate-name ${Name} + Select-ip_type ${Ip_type} sleep ${sleep} - click element xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div/div[2] - Create-Sub-Objects ${object_name} + click element xpath=${PolicyType}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div/div[2] + Create-Sub-Objects ${ObjectName} NewObject.Create-ok SourceCreate-name - [Arguments] ${objName} + [Arguments] ${ObjName} sleep ${sleep} - input text id=objectAdd_name ${objName} + input text id=objectAdd_name ${ObjName} SourceCreate-ok sleep ${sleep} click button id=objectAdd_ok DestinationCreate-name - [Arguments] ${policytype} ${objName} - input text xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[1]/div/div[1]/input ${objName} + [Arguments] ${PolicyType} ${ObjName} + input text xpath=${PolicyType}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[1]/div/div[1]/input ${ObjName} DestinationCreate-ok - [Arguments] ${policytype} + [Arguments] ${PolicyType} sleep ${sleep} - click button xpath=${policytype}/div[2]/div[2]/div/div[2]/button[1] + click button xpath=${PolicyType}/div[2]/div[2]/div/div[2]/button[1] Security-Source [Arguments] ${SourceType} ${SourceValue} Wait Until Element Is Enabled xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[1]/span/div/div/div[2]/div/div 10 click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[1]/span/div/div/div[2]/div/div - sleep 1 - run keyword if "${SourceType}"=="ID" run keywords sleep 1 + sleep ${sleep} + run keyword if "${SourceType}"=="ID" run keywords sleep ${sleep} ... AND click element xpath=/html/body/div/div[1]/div[1]/ul/li[2] - run keyword if "${SourceType}"=="Name" run keywords sleep 1 + run keyword if "${SourceType}"=="Name" run keywords sleep ${sleep} ... AND click element xpath=/html/body/div/div[1]/div[1]/ul/li[3] - run keyword if "${SourceType}"=="Action" run keywords sleep 1 + run keyword if "${SourceType}"=="Action" run keywords sleep ${sleep} ... AND click element xpath=/html/body/div/div[1]/div[1]/ul/li[4] - sleep 1 + sleep ${sleep} input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[1]/span/div/div/div[2]/div/div[1]/div[3]/div/input ${SourceValue} - sleep 1 + sleep ${sleep} click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[1]/span/div/i - sleep 1 + sleep ${sleep} click element xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1] - sleep 1 + sleep ${sleep} EditButton - sleep 1 + sleep ${sleep} click element xpath=//*[@id="appEdit"]/span/div/div[2] - sleep 1 + sleep ${sleep} Initialize-Policie [Arguments] ${InitializeAction} [Documentation] 调用次关键字前需要添加必填参数: ... ${InitializeAction}:根据用例进行填写,意思就是是那一个action就不要点击哪一个,以免初始化失败 - run keyword if "${InitializeAction}"=="Allow" run keywords sleep 1 + run keyword if "${InitializeAction}"=="Allow" run keywords sleep ${sleep} ... AND click element id=security_action_deny - ... AND sleep 1 - ... ELSE IF "${InitializeAction}"=="Deny" run keywords sleep 1 + ... AND sleep ${sleep} + ... ELSE IF "${InitializeAction}"=="Deny" run keywords sleep ${sleep} ... AND click element id=security_action_allow - ... ELSE IF "${InitializeAction}"=="Monitor" run keywords sleep 1 + ... ELSE IF "${InitializeAction}"=="Monitor" run keywords sleep ${sleep} ... AND click element id=security_action_deny - ... ELSE IF "${InitializeAction}"=="Intercept" run keywords sleep 1 + ... ELSE IF "${InitializeAction}"=="Intercept" run keywords sleep ${sleep} ... AND click element id=security_action_deny ... ELSE log 不修改 - sleep 1 + sleep ${sleep} ${status} Run Keyword And Return Status Page should contain element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form[1]/div/div[4]/div[1]/div/div/div #判断页面是否包含该元素 run keyword if "${status}"=="False" log go on - run keyword if "${status}"=="True" run keywords sleep 1 + run keyword if "${status}"=="True" run keywords sleep ${sleep} ... AND click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form[1]/div/div[4]/div[1]/div/div/div/p/span/span/i[2] - ... AND sleep 1 + ... AND sleep ${sleep} ${status1} Run Keyword And Return Status Page should contain element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form[1]/div/div[5]/div[1]/div/div/div #判断页面是否包含该元素 run keyword if "${status1}"=="False" log go on - run keyword if "${status1}"=="True" run keywords sleep 1 + run keyword if "${status1}"=="True" run keywords sleep ${sleep} ... AND click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form[1]/div/div[5]/div[1]/div/div/div/p/span/span/i[2] - ... AND sleep 1 + ... AND sleep ${sleep} Proxy-Deny [Arguments] ${ProxyDenyadd} - ${return} ${action} Run Keyword And Ignore Error Get From Dictionary ${ProxyDenyadd} action - ${action} Run Keyword If "${return}"=="FAIL" or "${action}"=="${EMPTY}" set variable null - ... ELSE set variable ${action} - ${return} ${denycode} Run Keyword And Ignore Error Get From Dictionary ${ProxyDenyadd} denycode - ${denycode} Run Keyword If "${return}"=="FAIL" or "${denycode}"=="${EMPTY}" set variable null - ... ELSE set variable ${denycode} - ${return} ${contenttype} Run Keyword And Ignore Error Get From Dictionary ${ProxyDenyadd} contenttype - ${contenttype} Run Keyword If "${return}"=="FAIL" or "${contenttype}"=="${EMPTY}" set variable null - ... ELSE set variable ${contenttype} + [Documentation] 调用次关键字前需要添加必填参数: + ... ${DenyCode}:填入403或404或451 + ... ${Action}:填入deny + ... ${Code}:填入403或404 + ... ${Content}:填入TEXT或Profile + ... ${SearchorCreate}:填入Search或Create + ... ${BlockText}:填入TEXT文本框内容 + ... ${ProfileName}:Profile的名字 + ... ${File}:上传文件路径 + ... ${TextValue}:填入text输入框内容 + ... 添加subaction + ${return} ${Action} Run Keyword And Ignore Error Get From Dictionary ${ProxyDenyadd} Action + ${Action} Run Keyword If "${return}"=="FAIL" or "${Action}"=="${EMPTY}" set variable null + ... ELSE set variable ${Action} + ${return} ${DenyCode} Run Keyword And Ignore Error Get From Dictionary ${ProxyDenyadd} DenyCode + ${DenyCode} Run Keyword If "${return}"=="FAIL" or "${DenyCode}"=="${EMPTY}" set variable null + ... ELSE set variable ${DenyCode} + ${return} ${ContentType} Run Keyword And Ignore Error Get From Dictionary ${ProxyDenyadd} ContentType + ${ContentType} Run Keyword If "${return}"=="FAIL" or "${ContentType}"=="${EMPTY}" set variable null + ... ELSE set variable ${ContentType} ${return} ${SearchorCreate} Run Keyword And Ignore Error Get From Dictionary ${ProxyDenyadd} SearchorCreate ${SearchorCreate} Run Keyword If "${return}"=="FAIL" or "${SearchorCreate}"=="${EMPTY}" set variable null ... ELSE set variable ${SearchorCreate} ${return} ${ProfileName} Run Keyword And Ignore Error Get From Dictionary ${ProxyDenyadd} ProfileName ${ProfileName} Run Keyword If "${return}"=="FAIL" or "${ProfileName}"=="${EMPTY}" set variable null ... ELSE set variable ${ProfileName} - ${return} ${file} Run Keyword And Ignore Error Get From Dictionary ${ProxyDenyadd} file - ${file} Run Keyword If "${return}"=="FAIL" or "${ProfileName}"=="${EMPTY}" set variable null - ... ELSE set variable ${file} - ${return} ${textvalue} Run Keyword And Ignore Error Get From Dictionary ${ProxyDenyadd} textvalue - ${textvalue} Run Keyword If "${return}"=="FAIL" or "${textvalue}"=="${EMPTY}" set variable null - ... ELSE set variable ${textvalue} - Deny-subaction ${action} ${denycode} - sleep 1 - Deny-content ${contenttype} ${SearchorCreate} ${ProfileName} ${file} ${textvalue} + ${return} ${File} Run Keyword And Ignore Error Get From Dictionary ${ProxyDenyadd} File + ${File} Run Keyword If "${return}"=="FAIL" or "${ProfileName}"=="${EMPTY}" set variable null + ... ELSE set variable ${File} + ${return} ${TextValue} Run Keyword And Ignore Error Get From Dictionary ${ProxyDenyadd} TextValue + ${TextValue} Run Keyword If "${return}"=="FAIL" or "${TextValue}"=="${EMPTY}" set variable null + ... ELSE set variable ${TextValue} + Deny-subaction ${Action} ${DenyCode} + sleep ${sleep} + Deny-content ${ContentType} ${SearchorCreate} ${ProfileName} ${File} ${TextValue} Deny-subaction - [Arguments] ${action} ${denycode} + [Arguments] ${Action} ${DenyCode} [Documentation] 调用次关键字前需要添加必填参数: - ... ${denycode}:填入403或404或451 - ... ${action}:填入deny + ... ${DenyCode}:填入403或404或451 + ... ${Action}:填入deny ... 添加subaction ${return} ${DecryptionProfileSearchorCreate} Run Keyword And Ignore Error Get From Dictionary ${DecryptionProfile} DecryptionProfileSearchorCreate ${DecryptionProfileSearchorCreate} Run Keyword If "${return}"=="FAIL" or "${DecryptionProfileSearchorCreate}"=="${EMPTY}" set variable null ... ELSE set variable ${DecryptionProfileSearchorCreate} - run keyword if "${action}"=="deny" and "${denycode}"=="403" run keywords sleep ${sleep} + run keyword if "${Action}"=="Deny" and "${DenyCode}"=="403" run keywords sleep ${sleep} ... AND click element id=manipulation_select_addAction ... AND sleep ${sleep} - ... AND click element //span[.="${denycode}"] + ... AND click element //span[.="${DenyCode}"] ... AND sleep ${sleep} - run keyword if "${action}"=="deny" and "${denycode}"=="404" run keywords sleep ${sleep} + run keyword if "${Action}"=="Deny" and "${DenyCode}"=="404" run keywords sleep ${sleep} ... AND click element id=manipulation_select_addAction ... AND sleep ${sleep} - ... AND click element //span[.="${denycode}"] + ... AND click element //span[.="${DenyCode}"] ... AND sleep ${sleep} - run keyword if "${action}"=="deny" and "${denycode}"=="451" run keywords sleep ${sleep} + run keyword if "${Action}"=="Deny" and "${DenyCode}"=="451" run keywords sleep ${sleep} ... AND click element id=manipulation_select_addAction ... AND sleep ${sleep} - ... AND click element //span[.="${denycode}"] + ... AND click element //span[.="${DenyCode}"] ... AND sleep ${sleep} ... AND Deny-content - [Arguments] ${contenttype}=File ${SearchorCreate}=null ${ProfileName}=null ${file}=null ${textvalue}=null + [Arguments] ${ContentType}=File ${SearchorCreate}=null ${ProfileName}=null ${File}=null ${TextValue}=null [Documentation] 调用次关键字前需要添加必填参数: - ... ${code}:填入403或404 + ... ${Code}:填入403或404 ... ${Content}:填入TEXT或Profile ... ${SearchorCreate}:填入Search或Create - ... ${block-text}:填入TEXT文本框内容 + ... ${BlockText}:填入TEXT文本框内容 ... ${ProfileName}:Profile的名字 - ... ${file}:上传文件路径 - ... ${textvalue}:填入text输入框内容 + ... ${File}:上传文件路径 + ... ${TextValue}:填入text输入框内容 ... 添加block数据内容 sleep ${sleep} - run keyword if "${contenttype}"=="File" run keywords sleep ${sleep} + run keyword if "${ContentType}"=="File" run keywords sleep ${sleep} ... AND click element id=manipulation_select_blockInfo ... AND sleep ${sleep} ... AND click element id=ResponseContentFile ... AND sleep ${sleep} ... AND click element id=manipulation_select_htmlProfile ... AND sleep ${sleep} - ... AND Profile-SearchorCreate ${SearchorCreate} ${ProfileName} ${file} - run keyword if "${contenttype}"=="Text" run keywords sleep ${sleep} + ... AND Profile-SearchorCreate ${SearchorCreate} ${ProfileName} ${File} + run keyword if "${ContentType}"=="Text" run keywords sleep ${sleep} ... AND click element id=manipulation_select_blockInfo ... AND sleep ${sleep} ... AND click ellement id=ResponseContentText ... AND sllep 1 - ... AND input text id=manipulation_elInput_blockselect ${textvalue} + ... AND input text id=manipulation_elInput_blockselect ${TextValue} ... AND sleep ${sleep} Profile-SearchorCreate - [Arguments] ${SearchorCreate} ${ProfileName} ${file} + [Arguments] ${SearchorCreate} ${ProfileName} ${File} [Documentation] 调用次关键字前需要添加必填参数: ... ${SearchorCreate}:填入Search或Create ... ${ProfileName}:Profile的名字 - ... ${file}:上传文件路径 + ... ${File}:上传文件路径 ... 判断是新建还是搜索profile sleep ${sleep} run keyword if "${SearchorCreate}"=="Search" run keywords sleep ${sleep} @@ -1749,7 +1794,7 @@ Profile-SearchorCreate ... AND sleep ${sleep} ... AND input text id=responsepages_profileName ${ProfileName} ... AND sleep ${sleep} - ... AND Choose File xpath=//*[@id="policy_Manipulation_create6"]/div[2]/form/div[2]/div/div/div/input ${file} #上传文件 + ... AND Choose File xpath=//*[@id="policy_Manipulation_create6"]/div[2]/form/div[2]/div/div/div/input ${File} #上传文件 ... AND sleep ${sleep} ... AND click element id=responseAddOk1 ... AND sleep ${sleep} @@ -1809,8 +1854,7 @@ Deny-Redirect Replace-Action-Parameters-for1 [Arguments] ${ReplaceActionParameters} [Documentation] 调用次关键字前需要添加必填参数:${ReplaceActionParameters}是个字典,字典中的数据为下 - ... ${ParametersType}:列表格式,Search 下拉框中内容 - ... ${i}:索引值 + ... ${ParametersType}:列表格式,Search 下拉框中内容 ... ${xxxFind}:是Find输入框输入的值 ... ${XXXReplacewith} :是 Replacewith输入框中输入的值 ${return} ${ParametersType} Run Keyword And Ignore Error Get From Dictionary ${ReplaceActionParameters} ParametersType @@ -1910,8 +1954,8 @@ HijackFile-SearchorCreate ... ${SearchorCreate}:填入Search或Create ... ${Hijackname}:填入新建hijack的name ... ${Hijackfile}:填入新建hijack文件的路径 - ... ${dow_name}:根据情况填入close或open或其他 - ... ${input};填入shuru或其他 + ... ${DowName}:根据情况填入close或open或其他 + ... ${Input};填入shuru或其他 ... ${Hijacktype}:填入选择文件类型的元素 ... 判断是新建还是搜索HijackFile ${return} ${SearchorCreate} Run Keyword And Ignore Error Get From Dictionary ${HijackFileadd} SearchorCreate @@ -1923,12 +1967,12 @@ HijackFile-SearchorCreate ${return} ${Hijackfile} Run Keyword And Ignore Error Get From Dictionary ${HijackFileadd} Hijackfile ${Hijackfile} Run Keyword If "${return}"=="FAIL" or "${Hijackfile}"=="${EMPTY}" set variable null ... ELSE set variable ${Hijackfile} - ${return} ${dow_name} Run Keyword And Ignore Error Get From Dictionary ${HijackFileadd} dow_name - ${dow_name} Run Keyword If "${return}"=="FAIL" or "${dow_name}"=="${EMPTY}" set variable null - ... ELSE set variable ${dow_name} - ${return} ${input} Run Keyword And Ignore Error Get From Dictionary ${HijackFileadd} input - ${input} Run Keyword If "${return}"=="FAIL" or "${input}"=="${EMPTY}" set variable null - ... ELSE set variable ${input} + ${return} ${DowName} Run Keyword And Ignore Error Get From Dictionary ${HijackFileadd} DowName + ${DowName} Run Keyword If "${return}"=="FAIL" or "${DowName}"=="${EMPTY}" set variable null + ... ELSE set variable ${DowName} + ${return} ${Input} Run Keyword And Ignore Error Get From Dictionary ${HijackFileadd} Input + ${Input} Run Keyword If "${return}"=="FAIL" or "${Input}"=="${EMPTY}" set variable null + ... ELSE set variable ${Input} ${return} ${Hijacktype} Run Keyword And Ignore Error Get From Dictionary ${HijackFileadd} Hijacktype ${Hijacktype} Run Keyword If "${return}"=="FAIL" or "${Hijacktype}"=="${EMPTY}" set variable null ... ELSE set variable ${Hijacktype} @@ -1946,16 +1990,16 @@ HijackFile-SearchorCreate ... ELSE IF "${SearchorCreate}"=="Create" run keywords sleep ${sleep} ... AND click element xpath=/html/body/div/div[1]/div[1]/ul/div[1]/div/div/button ... AND sleep ${sleep} - ... AND HijackFile-Create ${Hijackname} ${Hijackfile} ${dow_name} ${input} ${Hijackname} ${Hijacktype} + ... AND HijackFile-Create ${Hijackname} ${Hijackfile} ${DowName} ${Input} ${Hijackname} ${Hijacktype} ... ELSE log 传入参数错误 HijackFile-Create - [Arguments] ${Hijackfile} ${dow_name} ${input} ${Hijackname} ${Hijacktype} + [Arguments] ${Hijackfile} ${DowName} ${Input} ${Hijackname} ${Hijacktype} [Documentation] 调用次关键字前需要添加必填参数: ... ${Hijackname}:填入新建hijack的name ... ${Hijackfile}:填入新建hijack文件的路径 - ... ${dow_name}:根据情况填入close或open或其他 - ... ${input};填入shuru或其他 + ... ${DowName}:根据情况填入close或open或其他 + ... ${Input};填入shuru或其他 ... ${Hijacktype}:填入选择文件类型的元素 ... 新建hijack sleep ${sleep} @@ -1963,9 +2007,9 @@ HijackFile-Create sleep ${sleep} Choose File xpath=//*[@id="proxy"]/div[11]/div/div[1]/div[2]/form/div[2]/div/div/div[1]/input ${Hijackfile} #上传文件 sleep ${sleep} - run keyword if "${dow_name}"=="close" and "${input}"=="shuru" run keywords sleep ${sleep} + run keyword if "${DowName}"=="close" and "${Input}"=="shuru" run keywords sleep ${sleep} ... AND input text id=hijack_contentName ${Hijackname} - ... ELSE IF "${dow_name}"=="open" click element xpath=//*[@id="contentNameChoose"]/div[1]/span[2] + ... ELSE IF "${DowName}"=="open" click element xpath=//*[@id="contentNameChoose"]/div[1]/span[2] sleep ${sleep} click element id=hijackAddContentType #点击+ 打开侧滑窗口 sleep ${sleep} @@ -2052,7 +2096,7 @@ ProxyLogOptions [Documentation] 调用次关键字前需要添加必填参数: ... ${LogOptions}:填入All或其他 run keyword if "${LogOptions}"=="All" run keywords sleep ${sleep} - ... AND click element id=logType1 + ... AND click element id=logtype1 ... ELSE log 选择Metadata only ProxyEnabled [Arguments] ${Enabled}