0

I'm trying to get the IDE to run a test that fills out Username and Password fields. This test used to work until we implented SSO recently. Now the first password box does not fill in even though the step passes.

The element id="password"

Screenshots

Password field is skipped

All the steps say they were successfully run

I have tried changing the Command to Focus, ClickAt, SendKeys, Type and FireEvent but nothing I try works. I have looked around and did not see anything similar to this asked. Anyone come across an issue like this? I am stumped.

Gif of password field behavior

AaronCC
  • 53
  • 1
  • 2
  • 7
  • Can you try to make a halt after filling up `id="email"` and `element id="password"`. IMO, either the `email` or the `password` gets rendered within the DOM through a JS and you have to wait for completion. – undetected Selenium Jan 18 '18 at 08:59
  • More info - The password box is shaded until I click inside it and then it turns white and shows the cursor. I'm guessing that the test is not seeing this field active until it is clicked into? The 2nd password box does not do this. Added a gif to show this. "Gif of password field behavior" – AaronCC Jan 18 '18 at 13:26

2 Answers2

0

There can be multiple reasons why the Password field doesn't gets populated as follows :

  • As you provide Email Address just before Password, there is a possibility that a JavaScript validates the Email Address (once filled up / onfocusout event) if the same Email Address already exists in the Database. In that case the Password field won't be interactable untill the JavaScript/AJAX Call is completed.
  • The Password field seems to have some criteria as to include some Uppercase Letter/Number etc. So, if you invoke sendkeys() with a Character Sequence which doesn't matches the mentioned criteria the JavaScript validating the Character Sequence erases/removes the Character Sequence completely.

Solution :

You need to induce Explicit Wait i.e. WebDriverWait for the Password field to be clickable through ExpectedConditions clase as elementToBeClickable and then invoke sendkeys() with a Character Sequence fulfilling the mentioned criteria mentioned beside the Password field.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
0

It could be that there is some event attached to the password field. It could also be the browser. From my experience, Firefox works better with Selenium.

I would inspect the input field to see if there are any events or functions that block you from entering text. If there are, use the execute script Selenium IDE command to run a JS script that can remove it.