Well this is where dev tools in your browser of choice can become your best friend.
A quick tip; in dev tools you can test any xpath you want and can experiment with different xpaths to get the one you want, just use the
$x('<put your xpath here>') syntax in the console tab of dev tools.
when I did that with your xpath on that site, sure enough there are 2 matches:
so I had a bit of a look, there is actually 2 complete copies for the login form
one inside this div
<div class="modal-content background-customizable modal-content-mobile visible-xs visible-sm">
and one inside this div
<div class="modal-content background-customizable modal-content-mobile visible-md visible-lg">
modal-content-mobile class was the clue here as to what is going on, switch the browser to mobile device mode the first form became active.
FYI This feature in chrome based browsers gives you the ability to view a site as though you were using a mobile device:
So I guess you are testing with a desktop browser and as selenium’s default behaviour is to take the first match when multiple matches are found, you are hitting the first form which is hidden, and that explains your error and why the previous step passed.
Probably the easiest way to deal with it is:
Wait Until Element Is Visible xpath://div[contains(@class, "visible-lg")]//*[@id="signInFormUsername"] 10
input text //div[contains(@class, "visible-lg")]//*[@id="signInFormUsername"] user
Note the change from “Wait Until Element Is Enabled” to “Wait Until Element Is Visible”.
You’ll probably need to do the same for password and sign in button.
Hope that helps,