I am having trouble understanding #1 how to paramaterize a
userid and password that I need to call in about 25
existing scripts. I need to know how to Create a Reuseable
action for 25 existing scripts that will call the exact
same userid and password? I need to know how to create a
Reuseable action and then have it called by existing
scripts being run in a batch.

Answers were Sorted based on User's Feedback



I am having trouble understanding #1 how to paramaterize a userid and password that I need to call..

Answer / m.hemakumar

converting action into reusable action follow this
navigation

edit-action-action properties-Select resusable action check
box


RunAction "action Name",oneiteration,"userid
value","passwordvalue"


Note:
1)we have to define injput parameters in calling action

here calling action means actula action
called action is reusable action

Is This Answer Correct ?    0 Yes 0 No

I am having trouble understanding #1 how to paramaterize a userid and password that I need to call..

Answer / nagk24

first u have to parametriz from excel to datatable
datatable.importsheet"path of xl","sheetname in xl","action name in current test"
to get data from data table
dialog().winedit().set datatable("action name","clumn name")
later we can call dis action from any test
insert--->call to existing call

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

how can you select random value for every iteration from a weblist

4 Answers   Microsoft,


please post the interview questions for QA position in FACTSET

0 Answers   FactSet Systems,


Which version of QTP is using by companies nowadays?

4 Answers  


I have recorded a test using qtp to download a file in an application. Code: Browser("MFA Work Queue Manager").Page("MFA Work Queue Manager").Link("Rules Maintenance").Click Browser("MFA Work Queue Manager").Page("Rule Maintenance").WebEdit("txtSearch").Set "PmtType" Browser("MFA Work Queue Manager").Page("Rule Maintenance").WebButton("Search").Click Browser("MFA Work Queue Manager").Page("Rule Maintenance").WebButton("Export").Click Browser("MFA Work Queue Manager").Dialog("File Download").WinButton("Save").Click Browser("MFA Work Queue Manager").Page("Rule Maintenance").Sync Dialog("Save As").WinButton("Save").Click Dialog("Save As_2").WinButton("Yes").Click Problem: When running this test it gives an error at line no. 5 as Save button object is not identified by it's parent object. This code I ran 4 times after recording at it was working fine but 5th time onwords, it starts giving me the above problem. I used exist property option, Check Property option but none of this changes work at all. Kindly help...

1 Answers   Bank Of America,


For Passing Parameters from one Action to another Action we will use Input & Output parameters. Can any one tell how to use this Input & Output parameters with Example ?

2 Answers   TCS,


Approach for Installation,comaptibility,system testing

0 Answers   Diebold,


What is the difference between functions and actions in QTP?

7 Answers   Verizon,


.qfl extension for which file? where vl use it

3 Answers   iFlex,


Can I do Game testing with QTP tool

1 Answers   Google,


What is .Ini file in QTP?

3 Answers  


whare exactly we have to use functions and sub routain

0 Answers  


QTP Query: Hello to all, I'm getting an error (as below) when I perform descriptive programming on any Web application. "The test run cannot continue due to an unrecoverable error.The "myvar_0" object was not found in the Object Repository. Check the Object Repository to confirm that the object exists or to find the correct name for the object " But I do not have any problem when I perform the same descriptive programming on a Windows application such as Sample Application - Flight. Previosly , I had prepared a lot of scripts - both via creating the properties collection object and by giving the description in string arguments and implemented them on Flight and they're working perfectly fine.I'm using QTP Version 9.2 The sample script I have used for Web application is as below : Set myvar_0 = Description.Create 'Setting property collection object for Browser myvar_0("class").value = "Browser" myvar_0("name").value= ".*" 'Setting property collection object for Page Set myvar_1 = Description.Create myvar_1("class").value = "Page" myvar_1("name").value= ".*" 'Setting property collection object for Text box Set myvar_2 = Description.Create myvar_2("class").value = "WebEdit" myvar_2("name").value= ".*" 'Setting property collection object for Button Set myvar_3 = Description.Create myvar_3("class").value = "WebButton" myvar_2("name").value= ".*" SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe" Browser("myvar_0").Page("myvar_1").WebEdit("myvar_2").Set ("hello how are you ?") Browser("myvar_0").Page("myvar_1").WebButton ("myvar_3").Click Browser("myvar_0").Page("myvar_1").Sync Browser("myvar_0").Close As our application is a Web based application, I was planning to make a few changes in regards to the object names, but unfortunately I am getting the above mentioned error. Could anyone please advice me, whether it could anything to do with the run setting or anything else.I am getting the same error even while implementing on our Sample Application - Mercury Tours website. I would be grateful to anybody who can solve my problem !!

1 Answers  


Categories