RE: Unable to send password using sendKeys() function.

Hi All,

I’m new to selenium.

Unable to send password using sendKeys() function.

I tried finding the element using xpath, css as well as id, but it didn’t work out.

Kindly help me with this.

Thank you

sowmya Default Asked on September 4, 2015 in Selenium WebDriver.
Add Comment
2 Answers

package package_name;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

public class Password {

public static void main(String[] args)
System.setProperty(“”, “Path of┬áchromedriver.exe”);
WebDriver driver = new ChromeDriver();
WebElement email = driver.findElement(“login-username”));
email.sendKeys(“Enter your email”);

WebElement password = driver.findElement(“login-passwd”));



Train Answered on September 5, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.