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

What is recovery scenario manager? When you go for recovery scenario manager?

0 Answers  


how to run the script If QTP tool not identify object in web page

2 Answers  


what is meant by function library?Public and private functions in function library? if private functions are applicable for only for the particular test means then y we have to add those to function library?

0 Answers  


describe some problem that u had with automation testing tool?

3 Answers  


If you are testing a web application then what will you test in that application?

0 Answers   Infosys,






How many types of Test Plans are there...??

5 Answers  


I have 3 browsers i want to give facebook url in 2 nd browser using qtp

3 Answers   Tech Mahindra,


Please guide me release notes of Automation once scripts are completed

0 Answers  


Hi All, How to Compare two strings character by character in QTP

0 Answers  


How the objecs properties are identified?Tell me in Hierarchical order?

5 Answers   IBM,


What are the most frequent errors you faced while executing your scripts?

4 Answers   Semantic Space,


Key word driven framework

0 Answers   Wipro,


Categories