Quantcast
Channel: Micro Focus QTP (UFT) Forums - All Forums
Viewing all articles
Browse latest Browse all 1653

How to Automate Datatable column name and sheetname in function

$
0
0
Hello,

I am new here. I am working on a script with function library. I have created following function. 
'Function to Validate Login
Function fnChktext (Prop_Name,Prop_InnerText)
Dim Chktext
Set Chktext=Description.Create
Chktext("name").value=Prop_Name
Chktext("innertext").value=Prop_InnerText
If MyBrowser.Link(Chktext).Exist(2) Then
DataTable.Value("Results", "Global")="Test-Passed"
Else
DataTable.Value("Results", "Global")="Test-Failed"
End If
End Function

I want to resuse this function but I want user should enter ColumnName and Sheetname for DataTable to write values to DataTable. Instead of making it hard coded for column name and Sheetname. How Can I do this?

Viewing all articles
Browse latest Browse all 1653

Trending Articles