Ask a Question

Questions about not hard coding Login Credentials in TestComplete

SOLVED
Largent803
Contributor

Questions about not hard coding Login Credentials in TestComplete

I am working on some other questions that I have regarding the TestComplete during my evaluation process of the product.

 

Is there an easy way to create a test script so that the user credentials are not hard coded into the scripts.

 

textboxUsername SetText "XXXX" Sets the text 'XXXX' in the 'textboxUsername' text editor.
textboxUsername Keys "[Tab]" Enters '[Tab]' in the 'textboxUsername' object.
passwordboxPassword SetText Project.Variables.Password1 Sets the text Project.Variables.Password1 in the 'passwordboxPassword' text editor.
passwordboxPassword SetText Project.Variables.Password2 Sets the text Project.Variables.Password2 in the 'passwordboxPassword' text editor.
passwordboxPassword Keys "[Enter]" Enters '[Enter]' in the 'passwordboxPassword' object.

 

Now the way the system sets it up is that its hardcoded with a user name and their password.

I want to be able to generate a test where I can setup the code so that the other members on our team will enter their credentials to continue on with

a test?

1 ACCEPTED SOLUTION

Accepted Solutions
Marsha_R
Community Hero

Re: Questions about not hard coding Login Credentials in TestComplete

What you can do is walk through those logging in steps manually and have TestComplete record them in a test for you.  Then you can add that part to an existing test or add other steps to it.

https://support.smartbear.com/testcomplete/docs/testing-with/creating/recording/index.html

 

Try this and let us know if you have questions.

Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame

View solution in original post

7 REPLIES 7
Marsha_R
Community Hero

Re: Questions about not hard coding Login Credentials in TestComplete

Here's a user input box that you can use

https://support.smartbear.com/testcomplete/docs/reference/program-objects/builtin/inputbox.html

Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
Largent803
Contributor

Re: Questions about not hard coding Login Credentials in TestComplete

I am not sure I am following this example that was given in the instructions. I am not creating a database I have an environment that references

the table once the user credentials already entered. 

So I could be the person entering my credentials including user name and password the system automatically references my privilege's 

and then I want to create the test so that the individual who is using this test can enter their credentials and then continue on with the test. So basically

it could be anyone on our team who is using these tests.

AlexKaras
Community Hero

Re: Questions about not hard coding Login Credentials in TestComplete

Hi,

 

If I got your question right...

If you want to get password that is used when you are logging-in into your computer (i.e. your local system or domain password) then I am far not sure that this is possible at all.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Largent803
Contributor

Re: Questions about not hard coding Login Credentials in TestComplete

That is the best way to describe it. The user name and password are my Domain User Name and Password where I have been given the rights

to enter my User Name and Password information onto the environment which I am using to test the Website.

Marsha_R
Community Hero

Re: Questions about not hard coding Login Credentials in TestComplete

You will need to have your test navigate to the login page where you normally enter your credentials and then have the test

 

1) wait for a long enough time to let someone log in

2) watch for either the Login Failure page or the next page that would be there if the login is successful.

Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
Largent803
Contributor

Re: Questions about not hard coding Login Credentials in TestComplete

Do you have some sample code of this because I am going to want to be able to do this with TestComplete.

Marsha_R
Community Hero

Re: Questions about not hard coding Login Credentials in TestComplete

What you can do is walk through those logging in steps manually and have TestComplete record them in a test for you.  Then you can add that part to an existing test or add other steps to it.

https://support.smartbear.com/testcomplete/docs/testing-with/creating/recording/index.html

 

Try this and let us know if you have questions.

Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame

View solution in original post

cancel
Showing results for 
Search instead for 
Did you mean: