Hi...
Hear is the first TestNG scrit....
package test;
import com.thoughtworks.selenium.*;
import org.openqa.selenium.server.*;
import org.testng.annotations.*;
public class DefaultTNG {
public Selenium selenium;
public SeleniumServer seleniumserver;
@BeforeClass
public void setUp() throws Exception {
RemoteControlConfiguration rc = new RemoteControlConfiguration();
seleniumserver = new SeleniumServer(rc);
selenium = new DefaultSelenium("localhost", 4444, "*iexplore", "http://");
seleniumserver.start();
selenium.start();
}
@Test
public void testDefaultTNG()throws Exception {
selenium.open("http://www.yahoo.com");
selenium.windowMaximize();
selenium.open("http://www.google.com");
selenium.type("q", "Selenium OpenQA");
selenium.click("btnG");
Thread.sleep(10000);
}
@AfterClass
public void tearDown()throws Exception {
selenium.stop();
seleniumserver.stop();
}
}
October 25, 2010
First TestNG script
Tags
# selenium RC
# TestNG
About Naga
Soratemplates is a blogger resources site is a provider of high quality blogger template with premium looking layout and robust design. The main mission of templatesyard is to provide the best quality blogger templates.
TestNG
Labels:
selenium RC,
TestNG
Subscribe to:
Post Comments (Atom)
The post and training of naga sir is excellent..realy the first person am seeing even in such a great position,will response whenever we pings him,and during training ..really great job sir doing during training session and the post we seeing here
ReplyDeleteregards.,
Babu.m