Micro Focus QTP (UFT) Forums
parameterize testing - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: parameterize testing (/Thread-parameterize-testing)



parameterize testing - ronny - 09-27-2010

Hi:

please take a look at the script I captured below. I want to change 'QA instance' to parameter so same case can be run on different environment.

also i want to parameterize my user/pw entry.

could someone show me how to do that?

thanks


Code:
Browser("QA Instance").Page("QA Instance").Frame("gsft_main").WebEdit("user_name").Set "ronny"
Browser("QA Instance").Page("QA Instance").Frame("gsft_main").WebEdit("user_password").SetSecure "4c7bf359ad993c0fe76af0fe3"
Browser("QA Instance").Page("QA Instance").Frame("gsft_main").WebButton("Login").Click
Browser("QA Instance").Page("QA Instance").Frame("gsft_nav").Link("Homepage").Click
Browser("QA Instance").Page("QA Instance").Frame("gsft_nav").Link("Service Catalog").Click
Browser("QA Instance").Page("QA Instance").Frame("gsft_nav").Link("My Open Incidents").Click
Browser("QA Instance").Page("QA Instance").Frame("gsft_nav").Link("My Closed Incidents").Click
Browser("QA Instance").Page("QA Instance").WebButton("Logout").Click



RE: parameterize testing - A.Saini - 09-27-2010

Hi,

Try this code:

Code:
Browser("QA Instance").Page("QA Instance").Frame("gsft_main").WebEdit("user_name").Set DataTable(“UserName”, dtGlobalSheet)

Browser("QA Instance").Page("QA Instance").Frame("gsft_main").WebEdit("user_password").SetSecure DataTable(“Password”, dtGlobalSheet)

Hope It will help you.....
Smile


RE: parameterize testing - qtp2010 - 09-29-2010

Hi

You can parameterize in keyword view in Value column. click on right side in value column one window will pop-up and you can set up your parameters for login and pwd in global data sheet.(Insert name value like login name or password - it will show in global sheet.)

let me know if it helps