testng学习日记-10/26
来源:互联网 发布:淘宝职业差评师查询 编辑:程序博客网 时间:2024/06/16 14:59
package com.gubo;
import junit.framework.TestCase;
import org.testng.annotations.*;
import com.thoughtworks.selenium.DefaultSelenium;
import com.thoughtworks.selenium.Selenium;
public class TestPage2 extends TestCase {
private Selenium selenium;
@BeforeTest
public void prevshell()
{
System.out.println("now,let's begin");
}
@AfterTest
public void aftershell()
{
System.out.println("ok,succeed?");
}
@Parameters({ "v_1" })
@Test
public void setUp(String v_url) throws Exception
{
String url=v_url;
selenium=new DefaultSelenium("localhost",4444, "*iexplore", url);
System.out.println("init selenium");
selenium.start();
System.out.println("start successfully");
}
@Test
public void tearDown() throws Exception
{
selenium.stop();
}
@Test
public void testGoogleTestSearch() throws Throwable {
System.out.println("enter testGoogleTestSearch");
selenium.open("/");
System.out.println("open the google.com");
selenium.type("q", "selenium");
System.out.println("input type condition");
selenium.click("btnG");
System.out.println("begin search");
selenium.waitForPageToLoad("30000");
assertTrue(selenium.isTextPresent("selenium"));
System.out.println("finsh assert");
}
}
- testng学习日记-10/26
- testng学习日记-10/19
- testng学习日记-10/21
- TestNG 学习
- 学习testNg
- TestNG学习
- 10.26学习日记
- TensorFlow学习日记26
- EJB学习日记(10)
- Caffe学习日记10
- CUDA学习日记10
- 学习日记10
- TensorFlow学习日记10
- testNG的学习
- testNG 学习笔记1
- TestNG学习记录
- 学习:TestNg@DataProvider
- testNG学习点--零散
- 揭开国美电器黄光裕的盖子(转帖)
- 折腾PlanetLab: Failed to Implement PlanetLab "Hello World" tutorial
- 模块设计
- 系统延时
- Addhandler addressof 不错的列子
- testng学习日记-10/26
- Win32 OpenGL编程(7) 3D视图变换,真3D的关键
- 重新从这里开始
- Flash.ActionScript3.殿堂之路 笔记 1 [ActionScript3 Base]
- October 26th
- java中类的限定词的作用范围比较
- 将Java应用程序本地编译为EXE的几种方法
- 一不小心,愚人节就成了我们的节日
- Flash.ActionScript3.殿堂之路 笔记 2 [ActionScript3 typeof is as in delete]