04-02-2009, 02:34 PM
Hello everybody,
I am very new to this QTP.I am working on an automation project currently.
I need to enter some values on grid1 and click on "add" then this row gets added to another grid. so basically there are 2 grids.one is input grid with one row and the other one is display grid which displays the added rows.
now i need to automate this process.
So if i give values for the grid using the QTP in this way
This is setting the values for corresponding columns in that grid.but it is just appearing in the UI and actually not getting associated with grid as such.The datasource binded with this datagrid is not getting these values.
How i came to this conclusion is all these fields are mandatory.so after clicking add it is not retrieving anything and it tells please fill all fields.
Is there any other way to automatically enter some values to XtraGrid.GridControl or is there any way to set data to datasource from QTP?
can someone help me with this.
Hope i have mentioned my problem clearly.Let me know if some clarifications needed on this.
Thanks in advance.
Lakshmi.
I am very new to this QTP.I am working on an automation project currently.
I need to enter some values on grid1 and click on "add" then this row gets added to another grid. so basically there are 2 grids.one is input grid with one row and the other one is display grid which displays the added rows.
now i need to automate this process.
So if i give values for the grid using the QTP in this way
Code:
SwfWindow("ATRMS_UI").SwfTable("gridControl2").SetView ""
SwfWindow("ATRMS_UI").SwfTable("gridControl2").SelectCell 0,"*Name"
SwfWindow("ATRMS_UI").SwfTable("gridControl2").SetCellData 0,"*Name","param6"
SwfWindow("ATRMS_UI").SwfTable("gridControl2").SelectCell 0,"*Behaviour"
SwfWindow("ATRMS_UI").SwfTable("gridControl2").SetCellData 0,"*Behaviour","FIXED"
SwfWindow("ATRMS_UI").SwfTable("gridControl2").SelectCell 0,"*DataType"
SwfWindow("ATRMS_UI").SwfTable("gridControl2").SetCellData 0,"*DataType","INTEGER"
SwfWindow("ATRMS_UI").SwfTable("gridControl2").SelectCell 0,"*DefaultValues"
SwfWindow("ATRMS_UI").SwfTable("gridControl2").SetCellData 0,"*DefaultValues","23"
SwfWindow("ATRMS_UI").SwfObject("Add").Click
This is setting the values for corresponding columns in that grid.but it is just appearing in the UI and actually not getting associated with grid as such.The datasource binded with this datagrid is not getting these values.
How i came to this conclusion is all these fields are mandatory.so after clicking add it is not retrieving anything and it tells please fill all fields.
Is there any other way to automatically enter some values to XtraGrid.GridControl or is there any way to set data to datasource from QTP?
can someone help me with this.
Hope i have mentioned my problem clearly.Let me know if some clarifications needed on this.
Thanks in advance.
Lakshmi.