package seleniumTestNG;
import org.testng.annotations.Test;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.BeforeTest;
public class TestNG_F_TimeOut {
public WebDriver driver;
@Test
public void withouttimeout() {
driver.manage().timeouts().implicitlyWait(9, TimeUnit.SECONDS);
driver.get("http://www.seleniumlearn.com");
}
@Test (timeOut=2000)
public void withtimeout() {
driver.get("http://www.seleniumlearn.com");
}
@BeforeTest
public void beforeTest() {
driver=new FirefoxDriver();
driver.manage().window().maximize();
}
}