diff --git a/01-TestCase/tsg_ui/ui_settings/Decryption_Profile_Case.robot b/01-TestCase/tsg_ui/ui_settings/DecryptionProfileCase.robot similarity index 62% rename from 01-TestCase/tsg_ui/ui_settings/Decryption_Profile_Case.robot rename to 01-TestCase/tsg_ui/ui_settings/DecryptionProfileCase.robot index 29494bb..867cd72 100644 --- a/01-TestCase/tsg_ui/ui_settings/Decryption_Profile_Case.robot +++ b/01-TestCase/tsg_ui/ui_settings/DecryptionProfileCase.robot @@ -5,137 +5,171 @@ Resource ../../../02-Keyword/tsg_ui/setting/Settings.robot Library OperatingSystem *** Test Cases *** -Create_Decryption_Profile-001 +CreateDecryptionProfileNameMinSize + [Tags] PositiveTestCase name Settings DecryptionProfile ${dict} Create Dictionary 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 - Create-Decryption_Profile lyf-test-1 name ${dict} + CreateDecryptionProfile 1 name ${dict} click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span Delete -Create_Decryption_Profile-002 +CreateDecryptionProfileNameMaxSize + [Tags] PositiveTestCase name Settings DecryptionProfile + ${dict} Create Dictionary 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 + CreateDecryptionProfile CreateDecryptionProfileNameMaxSizeCreateDecryptionProfileNameMaxSizeCreateDecryptionProfileNameMaxSizeCreateDecryptionProfileNam name ${dict} + click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span + Delete + +CreateDecryptionProfileAllOpen + [Tags] PositiveTestCase AllOpen Settings DecryptionProfile + ${dict} Create Dictionary 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 + CreateDecryptionProfile lyf-test-1 name ${dict} + click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span + Delete + +CreateDecryptionProfileAllClose + [Tags] PositiveTestCase AllClose Settings DecryptionProfile ${dict} Create Dictionary Common Name=0 Issuer=0 Self-signed=0 Expiry Date=0 EV Certificat=0e ... Certificate Transparency=0 Mutual Authentication=0 On Protocol Errors=0 Certificate Pinning=0 Certificate Not Installed=0 Mirror Client Versions=0 ... Allow HTTP/2=0 - Create-Decryption_Profile lyf-test-2 name ${dict} + CreateDecryptionProfile lyf-test-2 name ${dict} click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span Delete -Create_Decryption_Profile-003 +CreateDecryptionProfileFail-closeAllOpen + [Tags] PositiveTestCase AllOpen Fail-close Settings DecryptionProfile ${dict} Create Dictionary 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 - Create-Decryption_Profile lyf-test-3 name ${dict} fail1=Fail-close + CreateDecryptionProfile lyf-test-3 name ${dict} fail1=Fail-close click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span Delete -Create_Decryption_Profile-004 +CreateDecryptionProfilePass-throughAllOpen + [Tags] PositiveTestCase AllOpen Pass-through Settings DecryptionProfile ${dict} Create Dictionary 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 - Create-Decryption_Profile lyf-test-3 name ${dict} fail1=Pass-through + CreateDecryptionProfile lyf-test-3 name ${dict} fail1=Pass-through click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span Delete -Create_Decryption_Profile-005 +CreateDecryptionProfileAllCloseSSLv3.0 + [Tags] PositiveTestCase AllClose SSLv3.0 Settings DecryptionProfile ${dict} Create Dictionary Common Name=0 Issuer=0 Self-signed=0 Expiry Date=0 EV Certificat=0 ... Certificate Transparency=0 Mutual Authentication=0 On Protocol Errors=0 Certificate Pinning=0 Certificate Not Installed=0 Mirror Client Versions=0 ... Allow HTTP/2=0 - Create-Decryption_Profile lyf-test-5 name ${dict} min1=SSLv3.0 max1=SSLv3.0 + CreateDecryptionProfile lyf-test-5 name ${dict} min1=SSLv3.0 max1=SSLv3.0 click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span Delete -Create_Decryption_Profile-006 +CreateDecryptionProfileAllCloseTLSv1.0 + [Tags] PositiveTestCase AllClose TLSv1.0 Settings DecryptionProfile ${dict} Create Dictionary Common Name=0 Issuer=0 Self-signed=0 Expiry Date=0 EV Certificat=0 ... Certificate Transparency=0 Mutual Authentication=0 On Protocol Errors=0 Certificate Pinning=0 Certificate Not Installed=0 Mirror Client Versions=0 ... Allow HTTP/2=0 - Create-Decryption_Profile lyf-test-6 name ${dict} min1=TLSv1.0 max1=TLSv1.0 + CreateDecryptionProfile lyf-test-6 name ${dict} min1=TLSv1.0 max1=TLSv1.0 click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span Delete -Create_Decryption_Profile-007 +CreateDecryptionProfileAllCloseTLSv1.1 + [Tags] PositiveTestCase AllClose TLSv1.1 Settings DecryptionProfile ${dict} Create Dictionary Common Name=0 Issuer=0 Self-signed=0 Expiry Date=0 EV Certificat=0 ... Certificate Transparency=0 Mutual Authentication=0 On Protocol Errors=0 Certificate Pinning=0 Certificate Not Installed=0 Mirror Client Versions=0 ... Allow HTTP/2=0 - Create-Decryption_Profile lyf-test-7 name ${dict} min1=TLSv1.1 max1=TLSv1.1 + CreateDecryptionProfile lyf-test-7 name ${dict} min1=TLSv1.1 max1=TLSv1.1 click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span Delete -Create_Decryption_Profile-008 +CreateDecryptionProfileAllCloseTLSv1.2 + [Tags] PositiveTestCase AllClose TLSv1.2 Settings DecryptionProfile ${dict} Create Dictionary Common Name=0 Issuer=0 Self-signed=0 Expiry Date=0 EV Certificat=0 ... Certificate Transparency=0 Mutual Authentication=0 On Protocol Errors=0 Certificate Pinning=0 Certificate Not Installed=0 Mirror Client Versions=0 ... Allow HTTP/2=0 - Create-Decryption_Profile lyf-test-8 name ${dict} min1=TLSv1.2 max1=TLSv1.2 + CreateDecryptionProfile lyf-test-8 name ${dict} min1=TLSv1.2 max1=TLSv1.2 click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span Delete -Create_Decryption_Profile-009 +CreateDecryptionProfileAllCloseTLSv1.3 + [Tags] PositiveTestCase AllClose TLSv1.3 Settings DecryptionProfile ${dict} Create Dictionary Common Name=0 Issuer=0 Self-signed=0 Expiry Date=0 EV Certificat=0 ... Certificate Transparency=0 Mutual Authentication=0 On Protocol Errors=0 Certificate Pinning=0 Certificate Not Installed=0 Mirror Client Versions=0 ... Allow HTTP/2=0 - Create-Decryption_Profile lyf-test-9 name ${dict} min1=TLSv1.3 max1=TLSv1.3 + CreateDecryptionProfile lyf-test-9 name ${dict} min1=TLSv1.3 max1=TLSv1.3 click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span Delete -Create_Decryption_Profile-010 +CreateDecryptionProfileCertCKSAllClose + [Tags] PositiveTestCase Settings DecryptionProfile ${dict} Create Dictionary Common Name=0 Issuer=0 Self-signed=0 Expiry Date=0 EV Certificat=0 ... Certificate Transparency=0 Mutual Authentication=1 On Protocol Errors=1 Certificate Pinning=1 Certificate Not Installed=0 Mirror Client Versions=1 ... Allow HTTP/2=1 - Create-Decryption_Profile lyf-test-10 name ${dict} + CreateDecryptionProfile lyf-test-10 name ${dict} click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span Delete -Create_Decryption_Profile-011 +CreateDecryptionProfileFail-close + [Tags] PositiveTestCase Fail-close Settings DecryptionProfile ${dict} Create Dictionary Common Name=1 Issuer=1 Self-signed=1 Expiry Date=1 EV Certificat=0 ... Certificate Transparency=0 Mutual Authentication=1 On Protocol Errors=1 Certificate Pinning=1 Certificate Not Installed=0 Mirror Client Versions=1 ... Allow HTTP/2=1 - Create-Decryption_Profile lyf-test-11 name ${dict} fail1=Fail-close + CreateDecryptionProfile lyf-test-11 name ${dict} fail1=Fail-close click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span Delete -Create_Decryption_Profile-012 +CreateDecryptionProfilePass-through + [Tags] PositiveTestCase Pass-through Settings DecryptionProfile ${dict} Create Dictionary Common Name=1 Issuer=1 Self-signed=1 Expiry Date=1 EV Certificat=0 ... Certificate Transparency=0 Mutual Authentication=1 On Protocol Errors=1 Certificate Pinning=1 Certificate Not Installed=0 Mirror Client Versions=1 ... Allow HTTP/2=1 - Create-Decryption_Profile lyf-test-12 name ${dict} fail1=Pass-through + CreateDecryptionProfile lyf-test-12 name ${dict} fail1=Pass-through click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span Delete -Create_Decryption_Profile-013 +CreateDecryptionProfileCertCKSCloseDBAndPVOpen + [Tags] PositiveTestCase Settings DecryptionProfile ${dict} Create Dictionary Common Name=0 Issuer=0 Self-signed=0 Expiry Date=0 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 - Create-Decryption_Profile lyf-test-13 name ${dict} + CreateDecryptionProfile lyf-test-13 name ${dict} click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span Delete -Create_Decryption_Profile-014 +CreateDecryptionProfileProtocolVersionOpen + [Tags] PositiveTestCase Settings DecryptionProfile ${dict} Create Dictionary Common Name=0 Issuer=0 Self-signed=0 Expiry Date=0 EV Certificat=0 ... Certificate Transparency=0 Mutual Authentication=0 On Protocol Errors=0 Certificate Pinning=0 Certificate Not Installed=0 Mirror Client Versions=1 ... Allow HTTP/2=1 - Create-Decryption_Profile lyf-test-14 name ${dict} + CreateDecryptionProfile lyf-test-14 name ${dict} click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span Delete -Create_Decryption_Profile-015 +CreateDecryptionProfileAllow HTTP/2Open + [Tags] PositiveTestCase Settings DecryptionProfile ${dict} Create Dictionary Common Name=0 Issuer=0 Self-signed=0 Expiry Date=0 EV Certificat=0 ... Certificate Transparency=0 Mutual Authentication=0 On Protocol Errors=0 Certificate Pinning=0 Certificate Not Installed=0 Mirror Client Versions=0 ... Allow HTTP/2=1 - Create-Decryption_Profile lyf-test-15 name ${dict} + CreateDecryptionProfile lyf-test-15 name ${dict} click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span Delete -Edit_Dercryption_Profile-16 +EditDercryptionProfileSearchID + [Tags] PositiveTestCase ID Settings DecryptionProfile ${dict} Create Dictionary 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=0 ... Allow HTTP/2=0 - Create-Decryption_Profile lyf-test-16 name ${dict} fail1=Pass-through min1=SSLv3.0 max1=SSLv3.0 + CreateDecryptionProfile lyf-test-16 name ${dict} fail1=Pass-through min1=SSLv3.0 max1=SSLv3.0 Sleep 1 ${id} get text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[1]/div/div/span sleep 1 ${dict1} Create Dictionary Common Name=0 Issuer=0 Self-signed=1 Expiry Date=1 EV Certificat=0 ... Certificate Transparency=0 Mutual Authentication=0 On Protocol Errors=0 Certificate Pinning=0 Certificate Not Installed=0 Mirror Client Versions=0 ... Allow HTTP/2=0 - Edit_Decryption Profile ${id} lyf-edit-test-1 id ${dict1} fail1=Fail-close min1=TLSv1.2 + EditDecryptionProfile ${id} EditDercryptionProfile id ${dict1} fail1=Fail-close min1=TLSv1.2 ... max1=TLSv1.2 \ No newline at end of file diff --git a/02-Keyword/tsg_ui/setting/Settings.robot b/02-Keyword/tsg_ui/setting/Settings.robot index acb1821..8517c9c 100644 --- a/02-Keyword/tsg_ui/setting/Settings.robot +++ b/02-Keyword/tsg_ui/setting/Settings.robot @@ -1082,7 +1082,7 @@ Min_max_version ... AND click id=pro_max0 ... ELSE log 错误 -Create-Decryption_Profile +CreateDecryptionProfile [Arguments] ${name} ${search} ${dict1}=null ${fail1}=null ${min1}=null ${max1}=null Sleep 1 click id=children6 #点击一级目录Settings @@ -1095,7 +1095,7 @@ Create-Decryption_Profile Sleep 1 input id=insert_profileName ${name} Sleep 1 - Button_Switch ${dict1} //*[@id="policy_Manipulation_create8"]/div[2]/form/div/div/label[contains(text(), " ")]/following-sibling::div/div el-switch is-checked el-switch + ButtonSwitch ${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 ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[3]/div[5]/div/div/label[1]/span @@ -1155,21 +1155,21 @@ Create-Decryption_Profile Should Be Equal As Strings ${name1} ${name} -Button_Switch +ButtonSwitch [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 click xpath=${xpath1}${key}${xpath2}/span - \ run keyword if "${class}"=="${close}" and "${dict}[${key}]"=="1" Run Keywords log 默认关闭,但需求需要开启,进行点击开启按钮 - \ ... AND sleep 1 - \ ... AND click xpath=${xpath1}${key}${xpath2}/span - \ run keyword if "${class}"=="${close}" and "${dict}[${key}]"=="0" log 默认关闭,不进行操作 - -Edit_Decryption Profile + 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 click xpath=${xpath1}${key}${xpath2}/span + run keyword if "${class}"=="${close}" and "${dict}[${key}]"=="1" Run Keywords log 默认关闭,但需求需要开启,进行点击开启按钮 + ... AND sleep 1 + ... AND click xpath=${xpath1}${key}${xpath2}/span + run keyword if "${class}"=="${close}" and "${dict}[${key}]"=="0" log 默认关闭,不进行操作 + END +EditDecryptionProfile [Arguments] ${id-name} ${name} ${search} ${dict1}=null ${fail1}=null ${min1}=null ... ${max1}=null click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles @@ -1186,7 +1186,7 @@ Edit_Decryption Profile sleep 1 input id=insert_profileName ${name} #输入name sleep 1 - Button_Switch ${dict1} //*[@id="policy_Manipulation_create8"]/div[2]/form/div/div/label[contains(text(), " ")]/following-sibling::div/div el-switch is-checked el-switch + ButtonSwitch ${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 ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[6]/div[5]/div/div/label[1]/span