public class testFluent {
WebDriver driver;
@Before
public void setUp(){
driver = new FirefoxDriver();
driver.manage().window().ma
I hope this helps u..
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
public class yahoo {
FirefoxDriver Driver=null;
WebDriverWait wait = null;
@BeforeTest
public void start(){
Driver = new FirefoxDriver();
}
@Test
public void Test() throws InterruptedException{
wait=new WebDriverWait(Driver,90);
System.out.println("Loading yahoo search page");
Driver.get("http://www.yahoo.com");
System.out.println("Yahoo search page loaded fine");
WebElement text=wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@id='p_13838465-p']")));
text.sendKeys("selenium");
Thread.sleep(5000);
}
@AfterTest
public void close(){
Driver.quit();
}
}