How will you send values to a cell in a webtable using QTP?

Answers were Sorted based on User's Feedback



How will you send values to a cell in a webtable using QTP?..

Answer / amarendra kothuru

For WebTable object, you can retreive the cell data but
can't set any value directly.

To retreive data.
val = Browser().Page().WebTable().GetCellData(row,column)

To set the value.
If you want to set any value on cell, you can do it on its
child objects.
So make sure what is the child object of that cell i.e.
either WebEdit or WebCheckBox or WebRadioButton etc...

Using the method, you can set the value to that child objet.

Using ChildItem method, you can fetch the child object of
the cell.
Browser().Page().WebTable().ChildItem
(row,col,ChildObjClassname,index of the child
object).Set "abcd"

or

Set ChildObj = Browser().Page().WebTable().ChildItem
(row,col,ChildObjClassname,index of the child object)
ChildObj.Set "abcd"

E.g.
Set ChildObj = Browser("ab").Page("cd").WebTable
("de").ChildItem(row,col,WebEdit,0)
ChildObj.Set "abcd"

If the cell has more than multiple similar child objects,
then you need to take care of the object index.

Is This Answer Correct ?    38 Yes 6 No

How will you send values to a cell in a webtable using QTP?..

Answer / rayudu

Using
setcelldata(row,Col,"Data")

Is This Answer Correct ?    6 Yes 28 No

Post New Answer

More QTP Interview Questions

Explain synchronization types in QTP

2 Answers  


what is meant by automation tool?

1 Answers  


How can we disable popup blocker? (I think it means when we get a pop up messge(its error) how we wil disable that one with out interrupting normal process)

5 Answers  


Is it possible to run QTP scripts created in IE 6.0 in IE 7.0?

4 Answers   TCS,


Can we install QTP on remote server and access it as a web application on other system (client place)? If so please let me know. Thanks in advance, Ravi

2 Answers  






What are the benefits of qtp?

0 Answers  


how we can take data in the username field text box into variable in web application explain with example and give all functions to get data into variables

6 Answers   iton, TATA,


HOW TO COUNT NUMBER OF ITEMS PRESENT IN WEB LIST

8 Answers  


What is the differnce between action & script

2 Answers   Lehman Brothers,


several browsers opened. write QTP script to close all browsers except gmail.

1 Answers   Thomson Reuters,


How can we upload pdf files in qtp?

1 Answers   Syntel, TCS,


How to use actions in qtp ?

0 Answers  


Categories