IE浏览器初始化:

selenium webdriver 测试PC时,浏览器中会存在很多cookie信息,执行测试前要先把cookie等信息删除。
谷歌浏览器初始化:

火狐浏览器初始化:

各个浏览器兼容的配置:
测试类:


定义一个browser类,兼容火狐、谷歌、IE:


BrowserType枚举类:

testng,groups分组:

有些测试用例在IE上运行,有些在火狐上运行,可以通过设置分组运行。
当然测试类上要先设置好分组。
IE浏览器初始化:
selenium webdriver 测试PC时,浏览器中会存在很多cookie信息,执行测试前要先把cookie等信息删除。
谷歌浏览器初始化:
火狐浏览器初始化:
各个浏览器兼容的配置:
测试类:
定义一个browser类,兼容火狐、谷歌、IE:
testng,groups分组:
有些测试用例在IE上运行,有些在火狐上运行,可以通过设置分组运行。
当然测试类上要先设置好分组。
本文标题:selenium webdriver
本文链接:https://www.haomeiwen.com/subject/hxdtjqtx.html
网友评论