Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Compare Webelement with Datatable Values
#2
Solved: 10 Years, 9 Months, 1 Week ago
Hi

Using the below code you can fetch the webelemt innertext runtime at the same time you can compare that value in ur datatable which is avaiable in ur Global sheet

Code:
strSrch = Browser().Page().Frame().webelement("innertext")
strFound = False
RCnt =Datatable.GetRowCount
CCnt =  Datatable.GetSheet("Global").GetParameterCount
For iR = 1 to RCnt
  For iC =1 to CCnt
    Datatable.SetCurrentRow(iR)
    strval= Datatable.Value(iC)
    If strcomp(strSrch,strval,1)=0 Then
      Msgbox "Search String Found in## " &iR & "##Row"
      strFound = True
      Exit For             
    End If
Next
If strFound = True Then
   Exit For
End If
Next
Reply


Messages In This Thread
RE: Compare Webelement with Datatable Values - by srikanthqtp - 04-29-2012, 06:38 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation WebElement("WebElement").Click is not working sia sharma 7 23,227 09-28-2016, 08:58 PM
Last Post: supputuri
  [UFT] Compare value of List with DataTable robertosalemi 2 2,889 04-06-2016, 08:12 PM
Last Post: robertosalemi
  Compare WebTable Elements saraiado 1 2,451 06-11-2015, 06:54 PM
Last Post: venkatesh9032
  Writing values to DataTable chewbecca 2 2,976 04-09-2015, 05:48 PM
Last Post: chinnikrishna
  Webelement Values profqa 1 2,287 01-05-2015, 11:07 PM
Last Post: supputuri

Forum Jump:


Users browsing this thread: 1 Guest(s)