Selenium - testing login doesn't enable Javascript button

921 Views Asked by At

I'm new to Selenium IDE. I have a login form with the following button functionality:

function init()
{   //attach the login validation to the password on change event
getElem("Password").onkeyup = handleLoginButtonValidation;
}

function handleLoginButtonValidation()
{   //if the password is of zero length then disable the button
getElem("Login").disabled = (getElem("Password").value.length == 0);
}

I tried to test it with Selenium IDE with the following code:

type id=Username username
type id=Password password
clickAndWait id=login

But eventhough the password is filled by Selenium, the button is still not enabled so my test timeouts.

Any ideas for a workaround for this?

1

There are 1 best solutions below

0
Msyk On BEST ANSWER

You can button enabled by.

fireEvent id=Password change
typeKeys id=Password password