Prepare for your Next Interview
This is a discussion on How to Script Username and Password Using QTP within the QTP forums, part of the Software Testing category; I really need to know how to Automate the Username and Password for 3 different web-based Surveys using QTP. Each Survey opens up a little differently but at the ...
|
|||
|
How to Script Username and Password Using QTP
I really need to know how to Automate the Username and Password for 3 different web-based Surveys using QTP. Each Survey opens up a little differently but at the exact same point they all ask for the same username and password, so I need to know what's the best way to create a script so that the username and password is automated across the board for all 3 surverys since the username and password is the same for each.
Thanks so much |
| Sponsored Links |
|
|||
|
Re: How to Script Username and Password Using QTP
1. Browser(B).Page(P).WebEdit(Password).SetSecure "
password can be encrypted using datatable. 2. In case there are multiple application's authnticated using same User Id & Password then u can parameterize the same script & fetch UserID & Password from a text file.. Regards, Nawab |
|
|||
|
Re: How to Script Username and Password Using QTP
OK Thanks so do I create a Script and then record the Username and Password and make that a Reuseable Action? How can I parameterize this and call it from Scripts that are already created? Is there a way to make this a reuseable action and call it in Scripts that are run in a batch without having to modify every script I already created?
|
|
|||
|
If there are scripts present's for the different flows ..u just need to have a common data source for the userID & Password..
Solution ONE Master Action Call all the 3 actions with parameter's(User ID & Password) Reusable Action1........put the data in Input Parameter's Reusable Action2........put the data in Input Parameter's Reusable Action3........put the data in Input Parameter's I am bit skeptical about ur implementation...could u please give details on how are u managing ur test..that can help us to give u a lucid answer. Regards, Nawab |
|
|||
|
Re: How to Script Username and Password Using QTP
OK so I can about 25 existing scripts and we commented out the Username and password portion because at first QTP was recongzing it, but now I need to record the Username and Password and make it a Reuseable action for all the existing scripts. Each script is going to use the exact same userid and password so I simply need to know #1 How to create that action in QTP 9.5 and then how to recall that action for all the existing scripts that will use that exact same user id and password. How do you tell 25 existing scripts to call One action if they are run in a batch?
|
|
|||
|
Re: How to Script Username and Password Using QTP
How do I create parameters for the User ID & Password? I am very new to QTP so I appreciate all your help in this matter.
|
|
|||
|
Quote:
------------------------------------------------------------------------- Function f_CredT Browser(b).Page(p).Frame(f).WebEdit(UserID).Set "UID" Browser(b).Page(p).Frame(f).WebEdit(Password).SetSecure "Encrypted Password" End Function ------------------------------------------------------------------------- I hope this will help, regards, Nawab |
|
|||
|
Re: How to Script Username and Password Using QTP
How exactly do I add it to the resources and where exactly is that? in the (Userid) (Password) parts do I put the actual userid and password here and then where do I insert this entire function in my scripts?
I'm very new to QTP so forgive me. Look forward to hearing from you soon. Raymond |
|
|||
|
Re: How to Script Username and Password Using QTP
Also do I have to insert this function for every script or is there a way for every script to Automatically call this action without me having to insert it in each one? Let me know exact where to insert this function as well
|
|
|||
|
You need to call this function in all of ur script.
Make sure that across the scripts u have consistency in OR Naming Conventions.....simply call the function as the .vbs resides in resources of all your scripts where ever its needed. I am not suggesting an Reusable Action as it eats up a lot memory space. good luck, Nawab |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| username, password, date and amount | puja123 | Test Cases | 6 | 12-06-2007 10:21 AM |
| Host username and password for Oracle 10g | supremo | Oracle | 1 | 06-25-2007 01:59 AM |
| Putty screen login and password script | dnarsingarao | Quality Center | 1 | 05-29-2007 04:43 AM |
| Prompt the username and password | Geek_Guest | Networking | 1 | 04-02-2007 01:37 AM |
| Default username/password for Oracle 8i | JobHelper | Oracle | 4 | 02-14-2007 01:51 AM |