headerBar(msnlogo) 和 PageTitle
上一篇 / 下一篇 2012-04-27 18:15:22 / 个人分类:TestNG/Ant/Eclipse/Java
TAG:
- 引用 删除 dian106106 / 2012-04-28 11:32:15
-
@Test(groups = { "funtest","headerbar","msnlogo"})
public void msnlogo() {
WebDriver driver = new FirefoxDriver();
//WebDriver driver = new HtmlUnitDriver();
//use htmlunit:Unable to locate a node using //img[@alt='msn']
driver.get("http://xin.msn.com/?lang=en-sg");
String url=driver.findElement(By.xpath("//img[@alt='msn']")).getAttribute("src");
String suburl=url.substring(url.length()-4,url.length());
String width=driver.findElement(By.xpath("//img[@alt='msn']")).getAttribute("width");
String height=driver.findElement(By.xpath("//img[@alt='msn']")).getAttribute("height");
assertEquals("147",width);
assertEquals("51",height);
assertEquals(".gif",suburl);
driver.close();
}
- 引用 删除 dian106106 / 2012-04-27 18:20:58
-
@Test(groups = { "funtest","headerbar","msnlogo"})
补上一个groups
标题搜索
日历
|
|||||||||
日 | 一 | 二 | 三 | 四 | 五 | 六 | |||
1 | 2 | 3 | 4 | ||||||
5 | 6 | 7 | 8 | 9 | 10 | 11 | |||
12 | 13 | 14 | 15 | 16 | 17 | 18 | |||
19 | 20 | 21 | 22 | 23 | 24 | 25 | |||
26 | 27 | 28 | 29 | 30 | 31 |
我的存档
数据统计
- 访问量: 74672
- 日志数: 80
- 建立时间: 2012-04-12
- 更新时间: 2013-05-21