package newproject;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class Amazon {
public static void main(String[] args) throws InterruptedException {
String url = ("https://in.yahoo.com/");
System.setProperty("webdriver.chrome.driver",
"F:\\Driver\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.get(url);
driver.manage().deleteCookieNamed(url);
driver.navigate().forward();
driver.manage().window().maximize();
driver.findElement(By.id("uh-signin")).click();
driver.findElement(By.id("login-username")).sendKeys("Thakur_aju2008@yahoo.com");
Thread.sleep(2000);
driver.navigate().forward();
driver.findElement(By.id("login-signin")).click();
//driver.findElement(By.name("password")).click();
driver.findElement(By.id("login-passwd")).sendKeys("Pranavpooja@2017");
//System.out.print("You are welcome");
}
}
I am trying to enter username and password in yahoo login page i am able to enter the username but not able to enter password
Aucun commentaire:
Enregistrer un commentaire