package seleniumTestNG;
import org.testng.annotations.Test;
import org.testng.annotations.BeforeTest;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.AfterTest;
public class TestNG_C_Execute_Priority_Wise {
WebDriver driver;
@Test(priority=5)
public void facebook() {
driver.get("http://www.fb.com/chinna.in");
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
}
@Test(priority=1)
public void twitter() {
driver.get("http://www.twitter.com/seleniumlearn");
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
}
@Test(priority=2)
public void Selenium() {
driver.get("http://www.seleniumlearn.com");
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
}
@Test(priority=4)
public void google() {
driver.get("http://plus.google.com/+Kpurushotham");
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
}
@Test(priority=3)
public void linkedin() {
driver.get("http://in.linkedin.com/in/purushothamk/");
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
}
@BeforeTest
public void beforeTest() {
driver=new FirefoxDriver();
driver.manage().timeouts().implicitlyWait(9, TimeUnit.SECONDS);
driver.manage().window().maximize();
}
@AfterTest
public void afterTest() {
}
}