02-11-2011, 01:10 PM
Hi please see the below code and somebody help me.....
I am trying to take rowcount, compare the data with input data from datatable and if the result is true then i want to click the particular cell or row. Here i am able to get data and compare but not getting how to click.
Clickcell is not working... please give me some idea....
'NOW HERE AFTER COMPARISON I WANT TO CLICK THE DATA . I AM NOT GETTING HOW TO TAKE COMPARED DATA AND CLICK THAT
I am trying to take rowcount, compare the data with input data from datatable and if the result is true then i want to click the particular cell or row. Here i am able to get data and compare but not getting how to click.
Clickcell is not working... please give me some idea....
Code:
intRowCount=Browser("New Incident").Page("New Incident").Frame("ifrmLookup").WbfGrid("EHDataGrid1").RowCount()
'Check the availablity of respective data in the Grid
For intRow=2 to intRowCount
'Get the Loginid from grid
strName=Browser("New Incident").Page("New Incident").Frame("ifrmLookup").WbfGrid("EHDataGrid1").getcelldata(intRow,2)
'Pass the dummy error flag
blnErrorFlag=True
'Comparing with input data
If strName=DataTable.Value("Loginid",1) Then
Reporter.reportEvent micPass,"Data is matching","Expected Data is:"&DataTable("Loginid",1)&" 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
Code:
'Browser("New Incident").Page("NewIncident").Frame("ifrmLookup").WbfGrid("EHDataGrid1").???????????? (AFTER wbfGrid THIS WHAT SCRIPT TO WRITE to click the data which I am comparing?)
'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("Loginid",1)&" and Actual data is:" &strName
End If
Next