Possible to programmatically enter username and password?

[ edit: see @jmangelo 's comment below for why this is a really bad idea, probably even if just for testing, which was the unstated intent. ]

I’m faced with a situation where user login details are simply not remembered and therefore I would like to enter them programatically from the users profile (i.e. effectively simulating the user entering their own details). However, while setting the values of elements “email” and “name” updates them on the screen, pressing the submit button results in a notification: “can’t be blank”

Set objElement = ieDoc.getElementsByName("email")
objElement(0).Value = "some@body.com"
Set objElement = ieDoc.getElementsByName("password")
objElement(0).Value = "12345678aA"

image

Set objElement = ieDoc.getElementsByName("submit")
objElement(0).Click 

image

Here is a similar question.

From the information provided it seems you have access to the end-user plain-text password in a programmatic way and that is a big issue. In other words, your application should not have this information stored which then makes this a non-issue as you would not have a password to programmatically fill.

The email/username is a different situation and as mentioned in the other question you mentioned Lock has a prefill option that would allow Lock to display with a specific email/username value already set. However, the most important thing to correct is the whole scenario because the application should not be keeping the password like that.

1 Like

Hmm - I take your point.

It was actually for testing, when I log out the last login info is never remembered in my browser and I am unsure why. That was the underlying reason for the question.

Considering the gravity of what you have pointed out I think even that kind of testing is silliness.

Thank you

Hey there!

Sorry for such huge delay in response! We’re doing our best in providing you with best developer support experience out there, but sometimes our bandwidth is not enough comparing to the number of incoming questions.

Wanted to reach out to know if you still require further assistance?