06-06-2017, 01:53 PM
Hello,
I am new here. I am working on a script with function library. I have created following function.
I want to reuse 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?
I am new here. I am working on a script with function library. I have created following function.
Code:
'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 reuse 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?