How do I hide a password in Selenium IDE

5,319 views
Skip to first unread message

Larry Brown

unread,
Jun 1, 2012, 4:43:01 PM6/1/12
to Selenium Users
I have been seeking an answer for this for some time with no luck. I
do not have a lot of experience with Selenium, or scripting in
general, but I have been able to create some useful scripts in
Selemium IDE. The issue is that my scripts have my unsecured password
in them. Is there a way to record a script and somehow obscure the
password or maybe create a stored procedure that calls the password
without revealing what it is? Here are the commands in my script:


@selenium.open "/"

@selenium.type "name=email", "em...@email.com"

@selenium.type "name=UserPWD", "password"


Greg

unread,
Jun 3, 2012, 5:31:29 AM6/3/12
to seleniu...@googlegroups.com
Larry,

I dont think theres any such functionality like that. What are you trying to do with the files where you need to hide the password? If you're saving them and giving them to a coworker, you'll probably have to click on the command in the IDE that types in the password and set the value to something like <password>. Then you can just save it while you get the message across.

Greg

Larry Brown

unread,
Jun 4, 2012, 12:13:40 PM6/4/12
to seleniu...@googlegroups.com
Greg,

So there is no way that you know of to maybe save your login information in a separate file that can be read by Selenium? I thought maybe there was a way to use the functionality for data driven testing to do this.

Gregory Rehm

unread,
Jun 4, 2012, 1:44:22 PM6/4/12
to seleniu...@googlegroups.com
Larry,

Data driven testing is not supported by the IDE. The IDE is good for a
few things primarily: teaching people the basics about selenium, and
helping the automation developer to find a locator.

If you're interested in more data driven testing try writing some
simple scripts in Selenium 2.0. If you're unsure about how to proceed
with that try exporting some test cases you made with the IDE in your
language of choice (if Java try TestNG, python and ruby are self
explanatory).

Scripting your tests is really the only way to create data driven
tests as you'll need large arrays of data. The IDE would have no way
of making sense of that data and also doesn't have the kind of built
in API's to integrate that data as well. Why is that? Selenium APIs
only interact with the web so to start integrating outside data into
your tests a framework would be very helpful. I would recommend
TestNG. However there are others such as JUnit NUnit, and Nose (TestNG
for Python).

There's really alot more I could talk about, but simple fact is if
you're interested in robust testing then scripting is the way to go.
Here are some good resources to get you started if you're interested
in continuing:

http://www.jcwebconcepts.net/blog/2010/04/27/setting-up-eclipse/
http://seleniumhq.org/docs/03_webdriver.html
http://testng.org/doc/index.html

Most of these links are useful if you program in Java; if not there
are other resources that are helpful, just tell me what your level of
technical experience is.

Greg
> --
> You received this message because you are subscribed to the Google Groups
> "Selenium Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/selenium-users/-/G3bGjUJQDXoJ.
>
> To post to this group, send email to seleniu...@googlegroups.com.
> To unsubscribe from this group, send email to
> selenium-user...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/selenium-users?hl=en.

Nathan Dace

unread,
Jun 4, 2012, 3:27:21 PM6/4/12
to seleniu...@googlegroups.com
Hiding passwords, even in encrypted form, doesn't really provide any protection of your password.

Assuming that you could encrypt the password, what would prevent another user running your tests to have an input performed on a regular textbox using your encrypted password?  It would show the password in clear text instead of showing a masked password.

QTP has this same issue.  You can encrypt passwords, and when used on password fields, works great at hiding a password.  But again, a user could simply have the test input the password on a normal textbox, and now the user has your password in clear text.
Reply all
Reply to author
Forward
0 new messages