Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get row number from web table
#1
Solved: 11 Years, 4 Months, 1 Week ago
Hi All,

I have a problem in retrieving row number from data table. I want to get the row no from specific data.

Code:
row= Browser(":: Cesar").Page(":: Cesar").Frame("frm_spnGrid").WebTable("1").GetRowWithCellText ("BAH-05:00-QTP")
msgbox row

BAH-05:00-QTP -
SHJ-BAH-05:00-QTP

when this code line execute, it gives wrong row no. it gives row number for the SHJ-BAH-05:00-QTP. I don’t know what is the reason. In here I have attached the web table image I used. I think both data are similar,

if any one knows how to solve this problem, please help me…
Thanks

Amilar


Attached Files Image(s)
   
Reply
#2
Solved: 11 Years, 4 Months, 1 Week ago
Try with GetRowWithCellText("BAH-05:00-QTP", <column No>) ...and also try to get all the values of the web table and locate the string "BAH-05:00-QTP"
Reply
#3
Solved: 11 Years, 4 Months, 1 Week ago
thx manizkrishnan

I added column no, but it didnt work. could u please tell me how to get all values from web table and locate string what we need. thanks

Amilar
Reply
#4
Solved: 11 Years, 4 Months, 1 Week ago
_______________________________________________
try this to get all values from the table...
Code:
NumRows = Browser(BrowserName).Page(PageName).WebTable(TableName).RowCount

NumColumns = Browser(BrowserName).Page(PageName).WebTable(TableName).ColumnCount(NumRows )

for i=1 To NumRows
    For j=1 To NumColumns
print Browser(BrowserName).Page(PageName).WebTable(TableName).GetCellData(i,j )
     Next
Next
Reply
#5
Solved: 11 Years, 4 Months, 1 Week ago
thanks manizkrishnan,

I did it.. thank you very much for your help.
thanks again......
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Web Object Unique ID Number zunebuggy 0 1,562 07-10-2017, 05:37 PM
Last Post: zunebuggy
  DataGrid: double click on selected row robertosalemi 0 4,437 05-12-2016, 03:00 PM
Last Post: robertosalemi
  Row count is always shown as 1 Harry1999 0 2,097 04-14-2016, 11:11 PM
Last Post: Harry1999
  VB Script to count number of links in a web page. Suma Parimal 4 25,292 07-01-2015, 12:59 PM
Last Post: govind
  Updating the web table Ananth1982 0 1,891 03-04-2015, 02:31 AM
Last Post: Ananth1982

Forum Jump:


Users browsing this thread: 2 Guest(s)