Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Vbscript syntax for using datatable in the place of hard coded value

Status
Not open for further replies.

kdjonesmtb2

Technical User
Nov 19, 2012
93
US
In HP QTP which uses vbscript I am trying to replace a hardcoded claimid with datatable driven value but my syntax is not correct

'Browser("ABN-NHP-APP-T11 - QNXT").Page("ABN-NHP-APP-T11 - QNXT").Frame("Frame_2").Link("set DataTable.Value("Claimid","Global")".Click ' this code does not work
Browser("ABN-NHP-APP-T11 - QNXT").Page("ABN-NHP-APP-T11 - QNXT").Frame("Frame_2").Link("10315xxxxxx").Click - this code works - this value was obtained via a recorded session

How do I replace the hardcoded value with a datatable field value named "Claimid"

Thanks
 
What about simply this ?
Browser("ABN-NHP-APP-T11 - QNXT").Page("ABN-NHP-APP-T11 - QNXT").Frame("Frame_2").Link(DataTable.Value("Claimid","Global")).Click

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hello

This worked. I have an additional question about a weblist



Hello

Browser("ABN-NHP-APP-T11 - QNXT").Page("ABN-NHP-APP-T11 - QNXT").Frame("Frame_3").WebList("ddlClaimType").Select "HCFA 1500" 'this code works



'Browser("ABN-NHP-APP-T11 - QNXT").Page("ABN-NHP-APP-T11 - QNXT").Frame("Frame_3").WebList("ddlClaimType").Set DataTable.Value("Form_Type","Global") ' this syntax does not work get the following error:

Object doesn't support this property or method: 'Browser(...).Page(...).Frame(...).WebList(...).Set'
Line (26): "Browser("ABN-NHP-APP-T11 - QNXT").Page("ABN-NHP-APP-T11 - QNXT").Frame("Frame_3").WebList("ddlClaimType").set DataTable.Value("Form_Type","Global")". Failed


 
You really didn't see that you replaced Select with Set ????
 
Hello

When I replace set with select I get the same error

Do I need to use a for next loop to account for the multiple form type drop down values in the application I am running this script for?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top