How can I check if a parameter exists in DataTable or not?
if err.number<> 0 then
'Parameter does not exist
else
'Parameter exists
end if
The best way would be to use the below code:
on error resume next
on error resume next
val=DataTable("ParamName",dtGlobalSheet)
if err.number<> 0 then
'Parameter does not exist
else
'Parameter exists
end if
You may find below links very useful if you want to know more about data tables in QTP.
- How to export datatable sheets to excel
- How to import excel-sheet to datatable
- How to read value from cell in datatable in QTP
- Explain setcurrentrow method in qtp
- Datatable object in qtp
- How to export datatable to excel in qtp
- How to get current sheet from datatable
- How to check if parameter exists in sheet in datatable in qtp
- Explain dtsheet object in qtp
- What are the utility objects in qtp
No comments:
Post a Comment
Please Leave your reply. We value your feedback and inputs