修改部分Settings测试用例及关键字,新增获取网页证书方法
This commit is contained in:
@@ -52,7 +52,7 @@ MyAccountEditDayMinimum
|
||||
OpenMyAccountPage
|
||||
EditMyAccount ${username} ${password} ${password} close
|
||||
|
||||
MyAccountEditDayMinimum
|
||||
MyAccountEditDayMax
|
||||
[Tags] Boundary UI Administration My Account
|
||||
OpenMyAccountPage
|
||||
EditMyAccount ${username} 1111111 1111111 open 2147483647
|
||||
|
||||
@@ -120,7 +120,6 @@ UsersCreatePasswordExpirationMax
|
||||
UsersCreateUserNameRepeat
|
||||
[Tags] Negtive UI Administration Users
|
||||
UserCreatePageErrorVerification UsersCreateUserNameRepeat byb 111111 log 30 log superuser
|
||||
sleep ${sleep_min}
|
||||
${text} get text xpath=/html/body/div[last()]/p
|
||||
Should Be Equal As Strings ${text} User already exists
|
||||
|
||||
|
||||
@@ -177,7 +177,8 @@ IPLibrariesCreateCountryandRegionAndCityMaxSize
|
||||
IPLibrariesCreateLongitudeAndLatitudeMaxSize
|
||||
[Tags] Boundary UI Settings IPLibraries
|
||||
${iplist} create list 10.1.1.1-20.1.1.1 20.1.1.1-30.1.1.1
|
||||
CreateIpLibraries Geo Name Country Africa 548460 548460 ${iplist} j=2 Country=548460 Longitude=180 Latitude=90
|
||||
${a}= RandomNumber
|
||||
CreateIpLibraries Geo Name Country Africa ${a} ${a} ${iplist} j=2 Country=${a} Longitude=180 Latitude=90
|
||||
DeleteIPLibraries
|
||||
|
||||
IPLibrariesGeoNameIDRepeat
|
||||
|
||||
@@ -48,7 +48,7 @@ ResponsePagesTurnPage
|
||||
[Tags] Positive UI Settings ResponsePages
|
||||
OpenPages sidebarProxy_Profiles profilesTabs_Profile_ResponsePages
|
||||
TurnPage //*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[5]/div/button[2] //*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[5]/div/button[1]
|
||||
... //*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[5]/div/span[2]/div/input 2 //*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div
|
||||
... //*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[5]/div/span[2]/div/input 2 //*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span
|
||||
|
||||
ResponsePagesPagingDisplay
|
||||
[Tags] Positive UI Settings ResponsePages
|
||||
|
||||
@@ -3,6 +3,7 @@ Force Tags tsg-ui settings response_pages
|
||||
Resource ../../../03-Variable/bifangapivariable.txt
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/tsg_ui/setting/Settings.robot
|
||||
Library ../../../04-CustomLibrary/Custometest/UIAssert.py
|
||||
|
||||
*** Test Cases ***
|
||||
CreateAndEdit
|
||||
@@ -16,3 +17,8 @@ NoName
|
||||
${ResponsrPageInfo} Create Dictionary CreateOrEdit=Create search=name Name=${EMPTY} file=${path}response_pages_files\\Create-ResponsePages-test.html
|
||||
... Negtive=yes Assertposition=//*[@id="policy_Manipulation_create6"]/div[2]/form/div[1]/div/div[3] asserttext=Please enter the content
|
||||
ResponsrPageCreateAndEdit ${ResponsrPageInfo}
|
||||
|
||||
|
||||
|
||||
test
|
||||
ttt
|
||||
@@ -107,6 +107,7 @@ CreateSNATIPPools
|
||||
Wait Until Element Is Enabled id=app_create ${sleep_Wait}
|
||||
${status} Run Keyword And Return Status Page Should Contain Go to #判断页面是否包含该文本
|
||||
Should Be Equal As Strings ${status} True #断言
|
||||
sleep ${sleep}
|
||||
|
||||
EditSNATIPPools
|
||||
[Arguments] ${value} ${search} ${name} ${type} ${ip}=null ${j}=1
|
||||
@@ -2284,6 +2285,7 @@ TurnPage
|
||||
... ${PreviousPage} 上一页按钮定位
|
||||
... ${JumpInput} 跳转页面输入框
|
||||
... ${pages} 跳转得页码
|
||||
sleep ${sleep}
|
||||
${text1} get text xpath=${AssertXpath}
|
||||
click xpath=${NextPage}
|
||||
sleep ${sleep}
|
||||
|
||||
15
04-CustomLibrary/Custometest/UIAssert.py
Normal file
15
04-CustomLibrary/Custometest/UIAssert.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import ssl, socket
|
||||
|
||||
#获取页面证书信息
|
||||
def ttt():
|
||||
hostname = 'vip.com'
|
||||
ctx = ssl.create_default_context()
|
||||
with ctx.wrap_socket(socket.socket(), server_hostname=hostname) as s:
|
||||
s.connect((hostname, 443))
|
||||
cert = s.getpeercert()
|
||||
|
||||
subject = dict(x[0] for x in cert['subject'])
|
||||
issued_to = subject['commonName']
|
||||
issuer = dict(x[0] for x in cert['issuer'])
|
||||
issued_by = issuer['commonName']
|
||||
print(issued_by)
|
||||
Reference in New Issue
Block a user