Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rowcount: getcelldata : compare : click on true result. Please help
#1
Solved: 10 Years, 8 Months, 4 Weeks ago
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....
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
Reply
#2
Solved: 10 Years, 8 Months, 4 Weeks ago
Try this,

Code:
Browser("New Incident").Page("NewIncident").Frame("ifrmLookup").WbfGrid("EHDataGrid1").Select intRow
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Smile If Then Is Always True For Web Objects zunebuggy 1 771 04-17-2020, 04:30 AM
Last Post: zunebuggy
  problem in getting rowcount mrigaja 0 710 10-09-2019, 03:55 PM
Last Post: mrigaja
  Exist and Visible Are True When Objects Aren't There - Is there A Better Way? zunebuggy 3 2,708 04-24-2018, 02:12 PM
Last Post: Ankur
  [UFT] WpfTable and WaitProperty with RowCount robertosalemi 0 1,846 11-23-2016, 10:55 PM
Last Post: robertosalemi
  SwfTable and RowCount: Unspecified Error robertosalemi 0 1,796 12-14-2015, 04:05 PM
Last Post: robertosalemi

Forum Jump:


Users browsing this thread: 1 Guest(s)