Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LookUp grid
#1
Solved: 11 Years, 4 Months ago
Hi All,

Please have a look at my attached screenshot.
This is the grid that pops-up when I click on a lookup image. My requirement is I need to dynamically select any required row(s)[record] through QTP. Below are the challenges I am facing:
1) How do I add this grid to the repository?? is it the webtable I am supposed to add?
2)If yes please let me know how do I select the rquired row(record) and hit save?
3)how do I count number of rows(records) present in the grid?

Please help me in this context.

Thanks
Swetha


Attached Files Image(s)
   
Reply
#2
Solved: 11 Years, 4 Months ago
Hi Swetha,

for the answers of your questions
Quote:1) How do I add this grid to the repository?? is it the webtable I am supposed to add?
Yes
Quote:2)If yes please let me know how do I select the rquired row(record) and hit save?
you must be identifying your row with some unique value in the row like property name, if so get the row number using the method 'GetRowwithCelltext', this will return you the row number. once you get that click the webelement of any cell from that row or i think simply the first cell will work. and then click the OK button
Quote:3)how do I count number of rows(records) present in the grid?
use .RowCount

hope this helps

Reply
#3
Solved: 11 Years, 4 Months ago
Thanks Saket For the immediate response.
Your answer almost solved my problems. Here is what I have written:
Code:
msgbox mypage.WebTable("PropertyLookup").RowCount
'Displaying the row count
Code:
var=  mypage.WebTable("PropertyLookup").GetRowWithCellText("MANSION HOUSE")
'Displaying the selected row count.

But, how do I make the pointer (in the grid) to point to the specified row[(GetRowWithCellText("MANSION HOUSE")]
?? as I see grid always points to the first record bydeafult.

Thanks again for your response

Swetha
Reply
#4
Solved: 11 Years, 4 Months ago
How do you select it manually? I beleive you just click on the row, right?
if so follow the two step identify the webelement in column 'Property Name' and click on the webelement
Code:
Set objChildItem =mypage.WebTable (("PropertyLookup").ChildItem (var, 2, "WebElement", 0)
objChildItem.Click

Reply
#5
Solved: 11 Years, 4 Months ago
Hi Saket,

Thank You verymuch for the help. It worked well.

Thanks again.

Swetha
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Not able to click text inside the grid dropdown szkapoo 6 4,634 12-20-2014, 09:43 PM
Last Post: supputuri
  SAPGUI Grid Ansh123 1 5,672 11-20-2014, 05:05 PM
Last Post: supputuri
  UFT with Windows grid user1 0 3,039 10-01-2014, 10:21 PM
Last Post: user1
  mfc grid object is not identified excellentpawan123 3 3,779 05-31-2014, 11:47 AM
Last Post: excellentpawan123
  Grid identified as WinList anushachanda 4 4,640 09-12-2012, 12:04 PM
Last Post: anushachanda

Forum Jump:


Users browsing this thread: 1 Guest(s)