Identify Rows columns in datagrid control
Why QTP 9.1 does not identify rows/cols in datagrid control?
In my application i need to enter some data in a webEdit, after submiting the data displayed in adatagrid . Now I need to verify whether the entered data is displayed in the datagrid or not. Here i am facing the problem the in the datagrid it dose not identify rows/cols in fact it detects the grid as a whole. so how can i verify one particular item in the grid? can anybody please help me ?
Re: Identify Rows columns in datagrid control
In Case the DataGrid is been captured as one of the Tables then you need to fetch the data using Methods associated with the Table....u might not get the Data as an Individual Object...
Regards
Nawab
Re: Identify Rows columns in datagrid control
Thanks for your response. The Data Grid is identifying as single [B]TDBgrid[/B] object i can not access individual rows and cols to match the item. I would be grateful to you if u can tell me which property shall i used to check previously entered item.
Regards
Kanta
[QUOTE=NawabShaikh;26580]In Case the DataGrid is been captured as one of the Tables then you need to fetch the data using Methods associated with the Table....u might not get the Data as an Individual Object...
Regards
Nawab[/QUOTE]
Re: Identify Rows columns in datagrid control
When you go for the DOM Model in QTP you might get some methods like
Bowser().Page().Frame().WbFgrid.Cell()...or soemthing else..here you can locate the Cell of the WebTable...I hope that will help!
Regards,
Nawab
Re: Identify Rows columns in datagrid control
The main problem is it does identify as wbfgrid just it is showing as TDBGrid object and no cell ar rows/col.
Re: Identify Rows columns in datagrid control
[QUOTE=kanta;26638]The main problem is it does identify as wbfgrid just it is showing as TDBGrid object and no cell ar rows/col.[/QUOTE]
Have you check with Object Repository for that object? Can you attach the Object repository screen shot to this question?
Thanks,
Suresh K
Re: Identify Rows columns in datagrid control
I was trying to write descriptive program.
Re: Identify Rows columns in datagrid control
[QUOTE=kanta;26488]Why QTP 9.1 does not identify rows/cols in datagrid control?
In my application i need to enter some data in a webEdit, after submiting the data displayed in adatagrid . Now I need to verify whether the entered data is displayed in the datagrid or not. Here i am facing the problem the in the datagrid it dose not identify rows/cols in fact it detects the grid as a whole. so how can i verify one particular item in the grid? can anybody please help me ?[/QUOTE]
Kanta, I am using DevExpress.XtraGrid and I am also facing the same problem as you mentioned 'QTP grid as a whole and I cannot access rows and columns'. Please help me if you have already found the solution.
I appreciate anyone who can help me for this. Thank you.
Re: Identify Rows columns in datagrid control
when u enter some data in to ur web edit it will displays some values on web table...if u verifies rows and coloumns...u can go this way...
dim row= browser("b name").page("p.name").web table.getrowcount
dim col =browser("b name").page("p.name").web table.get col count
for i=1 to rows
for j=1 to col
msgbox browser("b name").page("p.name").web table.getcell data(i,j)
next
next