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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is qtpro? What is quick test pro?

555


Explain advantages and disadvantages kdf?

514


How to use reporter.report event in qtp ?

545


How many types of recording modes in qtp? Which will be used when?

543


Approach for Installation,comaptibility,system testing

1698






Tell me one scenario, the complex functionality you have automated in your project?

1471


How many types of trigger events are there in qtp?

543


How to test fly out menu in qtp?

513


how did u use automating testing tools in ur job?

1479


Explain the concept of object repository and how quicktest professional recognises objects?

550


What is object repository in qtp?

552


What are the key points to create a framework in QTP for oracle forms?

1799


Key word driven framework

1682


Hi Friends, Can anyone help me out in this one? In QTP, I am using Data Driver and want to parameterise multiple values (say 3 values ) for a field. How can I do it using Data Driver wizard? Plz mention it step-by-step. In the end after doing the needful, on opening the Data Driver window, how can I get number (i.e. 3) in the Parameterised column for that particualr value? Thanks a lot in advance.

1437


banking project description for software tester

7016