|
|
|
|
How to get selected childitem in webtable?
|
|
02-07-2012, 11:44 PM
(This post was last modified: 02-08-2012 12:16 PM by rupali0205.)
Post: #1
|
|||
|
|||
|
How to get selected childitem in webtable?
Hi, In web application, webtable (wbfgrid) is displayed with 5th column containing 7 different values in non-editable boxes. QTP identifies these as 'WebElement'. I have selected one of the values (which is highlighted in blue after selection) in each row. Now I want to fetch the selected value. But I am not finding any distinguishing property between selected and non-selected value. Following snippet of code is tried to fetch the webelement value Set myWebTable = browser("title:=.*").page("title:=.*").wbfgrid("html id:=.*Grid") a = myWebTable.ChildItem(2, 5, "WebElement", 0).getroproperty("innertext") Please help Thanks Rupali |
|||
|
02-08-2012, 03:43 PM
Post: #2
|
|||
|
|||
|
RE: How to get selected childitem in webtable?
Just to add more info on this...
e.g. Following values are displayed in webelement boxes of column no. 5 val1 val2 val3 val4 Assume val2 is selected before and when I save the changes and come back to this page, val2 box is highlighted. If i execute the below code, I will get the below output. Set myWebTable = browser("title:=.*").page("title:=.*").wbfgrid("html id:=.*Grid") For index = 2 to 8 a = myWebTable.ChildItem(2, 5, "WebElement", index).getroproperty("innertext") print a Next o/p: val1 val2 val3 val4 I want to retrieve the value which is already selected i.e. val2. How will I get that? |
|||
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads... | |||||
| Thread: | Author | Replies: | Views: | Last Post | |
| How to write “blindly” to whatever object is selected | D2010 | 4 | 610 |
08-04-2010 03:29 PM Last Post: D2010 |
|
User(s) browsing this thread: 1 Guest(s)
|
|

Search
Member List
Calendar
Help



