当前位置:网站首页>【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");
}
执行结果:
边栏推荐
- 如何有效对直流列头柜进行监测
- 45岁教授,她投出2个超级独角兽
- Instructions for go defer
- PMP certificate renewal process
- Pytoch --- use pytoch to realize linknet for semantic segmentation
- 华为200万年薪聘请数据治理专家!背后的千亿市场值得关注
- go踩坑——no required module provides package : go.mod file not found in current directory or any parent
- Business implementation - the log is written to the same row of data
- Some basic functions of enterprise projects are developed, and important things are saved to online first a
- ECCV 2022 | Tencent Youtu proposed disco: the effect of saving small models in self supervised learning
猜你喜欢
Tester's algorithm interview question - find mode
他做国外LEAD,用了一年时间,把所有房贷都还清了
【雅思阅读】王希伟阅读P3(Heading)
ICML 2022 | 3dlinker: e (3) equal variation self encoder for molecular link design
Using fast parsing intranet penetration to realize zero cost self built website
Consolidated expression C case simple variable operation
如何用快解析自制IoT云平台
P3304 [sdoi2013] diameter (diameter of tree)
取得PMP證書需要多長時間?
人脸识别5- insight-face-paddle-代码实战笔记
随机推荐
A new method for analyzing the trend chart of London Silver
人脸识别5- insight-face-paddle-代码实战笔记
The waterfall flow layout demo2 (method 2) used by the uniapp wechat applet (copy and paste can be used without other processing)
Advanced template
如果炒股开华泰证券的户,在网上开户安全吗?
Using fast parsing intranet penetration to realize zero cost self built website
Hash table, hash function, bloom filter, consistency hash
IT转测试岗,从迷茫到坚定我究竟付出了什么?
Financial markets, asset management and investment funds
使用快解析搭建自己的minecraft服务器
22-07-02周总结
[paper reading] cavemix: a simple data augmentation method for brain vision segmentation
Basic points of the game setup of the points mall
S32 design studio for arm 2.2 quick start
uniapp微信小程序拿来即用的瀑布流布局demo2(方法二)(复制粘贴即可使用,无需做其他处理)
同事的接口文档我每次看着就头大,毛病多多。。。
OpenHarmony资源管理详解
Every time I look at the interface documents of my colleagues, I get confused and have a lot of problems...
[IELTS reading] Wang Xiwei reads P4 (matching2 paragraph information matching question [difficult])
积分商城游戏设置的基本要点