可靠性测试,例如按钮一般点击100次,最少点10次,无法点击除外
点击登录按钮
open browser http
://10.1.20.124:8090/ ff
maximize browser window
FOR $
{var
} IN RANGE
100
log $
{var
}
click link xpath
=/html
/body
/div
[1]/p
/a
[1]
sleep
2
GO back
END
from selenium
import webdriver
import time
driver
= webdriver
.Chrome
()
url
='http://10.1.20.124:8090/'
driver
.get
(url
)
driver
.maximize_window
()
for i
in range(101):
登录
= driver
.find_element_by_xpath
('//*[@id="header"]/p/a[1]').click
()
time
.sleep
(1)
print("第"+str(i
)+"次点击按钮!")
driver
.back
()
转载请注明原文地址: https://lol.8miu.com/read-21699.html