How to retrieve the password from the password text box. I tried by using below code but it's not working.
driver.findElement(By.id("Passwd")).getAttribute("value")
This is the HTML code of the input:
<input type="password"
placeholder="Password"
class="input identityinput"
id="password"
name="pw"
onkeypress="checkCaps(event)"
autocomplete="off"
onkeyup="if(this.value != ''){
document.getElementById('clrPw').style.display='block';
} else {
document.getElementById('clrPw').style.display='none';
}">
email
the labelusername
if you are speaking about yourpassword
field?