kdjonesmtb2
Technical User
Hello,
tt
I looking for a way to save the "name" of a wbfgrd to a vbscript variable. I want to be able to utilize a datatable to select a check box in wbfgrid if the strvalue in the grid equals the string value of a column in a datatable
I am using the HP QTP test tool which utilizes vbscript
The last 13 bytes of the WbfGrid below change with access of the Grid.
Is there command to get the value of the Wbfgrid and save it off?
Dim intRowCount
intRowCount=Browser("ABN-NHP-APP-T15 - QNXT").Window("Select Provider by Affiliation").Page("Select Provider by Affiliation").Frame("Frame").WbfGrid("dgAffil_DT_1362412170050").RowCount()
'Check the availablity of respective data in the Grid
For intRow=1 to intRowCount
'Get the AffiliationID from grid
strName=Browser("ABN-NHP-APP-T15 - QNXT").Window("Select a Pay-To Affiliation").Page("Select a Pay-To Affiliation").Frame("Frame").WbfGrid("dgAffil_DT_1362412170050").getcelldata(intRow,2)
'Pass the dummy error flag
blnErrorFlag=True
'Comparing with input data
If strName=DataTable.Value("Affiliationid","Global") Then
Reporter.reportEvent micPass,"Data is matching","Expected Data is:"&DataTable("Affiliation","Global")&" and Actual data is:" &strName
blnErrorFlag=False
'NOW HERE AFTER COMPARISON I WANT TO CLICK THE DATA . I AM NOT GETTING HOW TO TAKE COMPARED DATA AND CLICK THAT
'Browser("New Incident").Page("NewIncident").Frame("ifrmLookup").WbfGrid("EHDataGrid1").???????????? (AFTER wbfGrid THIS WHAT SCRIPT TO WRITE to click the data which I am comparing?)
'Browser("ABN-NHP-APP-T15 - QNXT").Window.("Select a Pay-To Affiliation").Page("Select a Pay-To Affiliation").Frame("Frame").WbfGrid("dgClmNetwork_DT_1362163099643").Select intRow
'Browser("New Incident").Page("NewIncident").Frame("ifrmLookup").WbfGrid("EHDataGrid1").Select intRow
Browser("ABN-NHP-APP-T15 - QNXT").Window("Select a Pay-To Affiliation").Page("Select Provider by Affiliation").Frame("Frame").WbfGrid("dgAffil_DT_1362412170050").Select intRow
On Error Resume Next
'To exit/move out from the loop
Exit For
End If
'Check the error flog is true
If blnErrorFlag=True Then
Reporter.reportEvent micFail,"Data is mismatching","Expected Data is:"&DataTable("Affliationid","Global")&" and Actual data is:" &strName
End If
Next
tt
I looking for a way to save the "name" of a wbfgrd to a vbscript variable. I want to be able to utilize a datatable to select a check box in wbfgrid if the strvalue in the grid equals the string value of a column in a datatable
I am using the HP QTP test tool which utilizes vbscript
The last 13 bytes of the WbfGrid below change with access of the Grid.
Is there command to get the value of the Wbfgrid and save it off?
Dim intRowCount
intRowCount=Browser("ABN-NHP-APP-T15 - QNXT").Window("Select Provider by Affiliation").Page("Select Provider by Affiliation").Frame("Frame").WbfGrid("dgAffil_DT_1362412170050").RowCount()
'Check the availablity of respective data in the Grid
For intRow=1 to intRowCount
'Get the AffiliationID from grid
strName=Browser("ABN-NHP-APP-T15 - QNXT").Window("Select a Pay-To Affiliation").Page("Select a Pay-To Affiliation").Frame("Frame").WbfGrid("dgAffil_DT_1362412170050").getcelldata(intRow,2)
'Pass the dummy error flag
blnErrorFlag=True
'Comparing with input data
If strName=DataTable.Value("Affiliationid","Global") Then
Reporter.reportEvent micPass,"Data is matching","Expected Data is:"&DataTable("Affiliation","Global")&" and Actual data is:" &strName
blnErrorFlag=False
'NOW HERE AFTER COMPARISON I WANT TO CLICK THE DATA . I AM NOT GETTING HOW TO TAKE COMPARED DATA AND CLICK THAT
'Browser("New Incident").Page("NewIncident").Frame("ifrmLookup").WbfGrid("EHDataGrid1").???????????? (AFTER wbfGrid THIS WHAT SCRIPT TO WRITE to click the data which I am comparing?)
'Browser("ABN-NHP-APP-T15 - QNXT").Window.("Select a Pay-To Affiliation").Page("Select a Pay-To Affiliation").Frame("Frame").WbfGrid("dgClmNetwork_DT_1362163099643").Select intRow
'Browser("New Incident").Page("NewIncident").Frame("ifrmLookup").WbfGrid("EHDataGrid1").Select intRow
Browser("ABN-NHP-APP-T15 - QNXT").Window("Select a Pay-To Affiliation").Page("Select Provider by Affiliation").Frame("Frame").WbfGrid("dgAffil_DT_1362412170050").Select intRow
On Error Resume Next
'To exit/move out from the loop
Exit For
End If
'Check the error flog is true
If blnErrorFlag=True Then
Reporter.reportEvent micFail,"Data is mismatching","Expected Data is:"&DataTable("Affliationid","Global")&" and Actual data is:" &strName
End If
Next