Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
request for VB code for finding X in dynamic web table
#1
Solved: 11 Years, 4 Months, 3 Weeks ago MyBB 
I am looking for Ideas here.
Problem:

I am trying to find a value in a dynamic web table let’s say the value is “X”. I need to return the position of “X” and then Return the X.

I need the VB Code that finds a value lets say it is “X” and is located in a dynamic web table that has a dynamic number of rows and coulombs.

I need the VB code that returns the position of X

I need the VB code to return the “X”

Thanks David
Reply
#2
Solved: 11 Years, 4 Months, 3 Weeks ago
Code:
iRow = Browser().page().webtable().Rowcount
iColumn =  Browser().page().webtable().Columncount

For i= 0 to iRow
For j =0 to iColumn
        set objWebtable = Browser().page().webtable()
          if X = objwebtable.getcelldata(i,j)  
                       Msgbox "Row Number : " & i & " and Column number : " & j
                       Msgbox "Value of X : " & X
                       Exit For
          End if
Next    
Next
Syntext may be incorrect but the logic is right.

~ Jay
Reply
#3
Solved: 11 Years, 4 Months, 3 Weeks ago
Thanks Jay
this is what I was thinking
Pseudo code:::::

Code:
For row = 1 to rowsize :: A loop to count rows
For col = 1 to colsize :: A loop to count columns
If box(x,y).value ="x" then :: Test
Print "Box" row ", " col "has value " box(x,y).value
:: Show user results
end if :: end conditional
end for loop :: col
end for loop :: row
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Can QTP handle slick grid table in a web page qtplearner88 2 4,565 10-01-2019, 10:44 AM
Last Post: shilpi952
  unable to rowcount in web table manoj84monu 1 2,929 06-13-2016, 04:46 PM
Last Post: Anu1234
  Finding a cell Location on a datatable rhozeski 0 2,058 11-23-2014, 02:38 AM
Last Post: rhozeski
  How to select dynamic checkbox from web dropdown QA_Newbie 2 4,701 07-20-2014, 09:40 PM
Last Post: QA_Newbie
  Request Help | Usage of Oracle Add-In for Oracle SQL Developer Nasir Ahmed 3 3,606 06-18-2014, 04:28 PM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)