当前位置:网站首页>【selenium自动化】常用注解
【selenium自动化】常用注解
2022-07-05 00:08:00 【linrui7】
常用注解
@Test
@BeforeMethod test方法执行前
@AfterMethod test方法执行后
@BeforeClass 类初始化后
@AfterClass 类销毁之前
static WebDriver webDriver;
@Test
public void test1() {
System.out.println("Test");
}
@BeforeMethod
public void test2() {
webDriver = new ChromeDriver();
System.out.println("BeforeMethod");
}
@AfterMethod
public void test3() {
webDriver.quit();
System.out.println("AfterMethod");
}
@BeforeClass
public void test4() {
System.out.println("BeforeClass");
}
@AfterClass
public void test5() {
System.out.println("AfterClass");
}
执行结果:
边栏推荐
- Go step on the pit - no required module provides package: go mod file not found in current directory or any parent
- [Peking University] tensorflow2.0-1-opening
- [monitoring] ZABBIX
- 图解网络:什么是网关负载均衡协议GLBP?
- What is the difference between port mapping and port forwarding
- C语言中sizeof操作符的坑
- 端口映射和端口转发区别是什么
- ECCV 2022 | Tencent Youtu proposed disco: the effect of saving small models in self supervised learning
- How to avoid arc generation—— Aafd fault arc detector solves the problem for you
- Expand your kubecl function
猜你喜欢
[IELTS reading] Wang Xiwei reads P4 (matching2 paragraph information matching question [difficult])
Acrel-EMS综合能效平台在校园建设的意义
How to avoid arc generation—— Aafd fault arc detector solves the problem for you
[IELTS reading] Wang Xiwei reading P3 (heading)
How to effectively monitor the DC column head cabinet
[kotlin] the third day
【雅思阅读】王希伟阅读P4(matching2段落信息配对题【困难】)
[论文阅读] CarveMix: A Simple Data Augmentation Method for Brain Lesion Segmentation
Application of fire fighting system based on 3D GIS platform
Fast parsing intranet penetration helps enterprises quickly achieve collaborative office
随机推荐
P4408 [noi2003] truant children (tree diameter)
[论文阅读] CarveMix: A Simple Data Augmentation Method for Brain Lesion Segmentation
Instructions for go defer
[monitoring] ZABBIX
How to reduce the stock account Commission and stock speculation commission? Is it safe to open an online account
Five papers recommended for the new development of convolutional neural network in deep learning
PMP certificate renewal process
他做国外LEAD,用了一年时间,把所有房贷都还清了
Ap8022 switching power supply small household appliances ACDC chip offline switching power supply IC
电力运维云平台:开启电力系统“无人值班、少人值守”新模式
Parsing of XML
Go pit - no required module provides Package: go. Mod file not found in current directory or any parent
积分商城游戏设置的基本要点
机器人强化学习——Learning Synergies between Pushing and Grasping with Self-supervised DRL (2018)
公司要上监控,Zabbix 和 Prometheus 怎么选?这么选准没错!
If you open an account of Huatai Securities by stock speculation, is it safe to open an account online?
[IELTS reading] Wang Xiwei reading P4 (matching1)
Chinese verification of JS regular expressions (turn)
Cross domain request
[JS] - [dynamic planning] - Notes