I have two input fields username and password. I am unable to locate and enter the inputs using selenium. Login button click also fails.
Please find the HTML
<div id="loginTable">
<form accept-charset="UTF-8" name="loginForm" method="POST" action="/cgi-bin/login">
<table>
<tbody>
<tr>
<td>User name:</td><td colspan="2"><input name="LOGIN"></td></tr><tr>
<td>Password:</td><td colspan="2"><input name="PWD" type="password"></td></tr><tr>
<td colspan="2"><button type="submit">Login</button></td></tr></tbody></table></form></div>
i have used below code lines,
driver.findElement(By.xpath("//[@id=\"loginTable\"]/form/table/tr[1]/td[2]/input")).sendKeys("test"); driver.findElement(By.name("LOGIN")).sendKeys("test");
WebElement userEntry=wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("LOGIN"))); userEntry.sendKeys("Test");
None of them are working.
Login button also not working. Please help me.