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
How will you handle java tree in qtp?
How the smart identification is used in real time?Please explain with an example
What is action?
after click on compose mail how can we attached a file in qtp with vbscript code
What are some test assets and related extensions of qtp?
How to use conditional loops in qtp ?
what r the main attributes of test automation?
Explain the check points in quicktest professional?
hi i have completed my b.tech in cse stream. now i am working in an organisation in testing department. i want do sap course but i dnt know which module will boost my career can anyone suggest me which is good for my career
Through array we can execute the testcase how ? give me example
Can U Explain about QTP tool from older version to latest version also its differences?
How to handle the exceptions using recovery secnario manager in quicktest professional?
Will down time for server and content maintenance/upgrades be allowed? how much?
Presently i am working on QTP 8.2 Version,i want to know features in 9.2 version, because i have not sufficient time to put the effort on the 9.2 version
what is error and fault in terms of software quality?