-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathYahoo.java
More file actions
34 lines (27 loc) · 790 Bytes
/
Yahoo.java
File metadata and controls
34 lines (27 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.Sleeper;
public class Yahoo {
FirefoxDriver driver;
public void open()
{
driver=new FirefoxDriver();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.manage().window().maximize();
driver.get("http:/facebook.com");
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
}
public void search()
{
driver.findElement(By.id("email")).sendKeys("undeclared");
driver.findElement(By.id("pass")).sendKeys("undeclared");
driver.findElement(By.id("loginbutton")).click();
}
public static void main(String args[])
{
Yahoo obj=new Yahoo();
obj.open();
obj.search();
}
}