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

HI All i need one suggestion.is there any companies taking corresponding degree courses. i have 3+ yrs exp in QTP and i am working north side. iam looking for job in south.

1 Answers  


Can we record an application running on a remote machine using qtp?

0 Answers  


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

3 Answers   Tech Mahindra,


how to test background color and dynamic images during runtime

4 Answers   CTS,


At a time how many users can access QTP?

5 Answers  






How to sendKeys in QTP? Diff b/w sendkeys and device replay? Diff b/w function and Sub? Diff b/w Array and List Different Types of running Keys other than Fast, slow,Normal mode Regular expression for http://newtours.demoaut.com Difference between \w and \W How to generate script button Recording Types Different Types of Actions? Using DP performance degrades, If Yes why? How to close all the opened browsers? Diff b/w SystemUtil.Run and invoke application? If qtp not recognized the combo box How to select values from drop down?

0 Answers  


Why we are going for descriptive programming ? I answered as 'If objects are not present in OR we will go for descriptive Programming'? Is this correct ?

3 Answers   Polaris,


what is debugging testing?

5 Answers  


how qtp identifies objects of application.

5 Answers   Intel,


What is diff. between ordinal identifier INDEX and Location?

3 Answers  


what is descriptive programming? what are the mandotory properties in qtp? what are libriry functions in qtp? what frame work you are using at your project? what is object repositery? what is our role as per qtp project is concerned as a software tester?

3 Answers   Wipro,


What is smart identification?

2 Answers   AZTEC,


Categories