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 to convert 100 into hundred repees only and viceversa
What are the advantages of Object Repository?
Is there anyway to automatically update the Datasource name in Database Checkpoints object when we migrate tests to a new release?
I need Major Help with a Script I recorded in QTP 9.5. I am recording scripts for a Web-based application(s) I have all the URLs for each application in Excel spreadhsheet so that QTP can pull that particular application from the spreadsheet and run it. The problem is QTP isn't recognizing one particular URL so when I hit run in QTP to run this script it opens the internet Explorer but isn't open the URL I have in the Excel spreadsheet. I've retyped the URL and still QTP won't open this Particular one for some reason. The site its self is working fine but for whatever reason QTP won't open it. How do I resolve this? I have a deadline of next Friday the 7th to complete this task so please help me in any way you can. Thanks in advance
Did the scripts need lot of maintenance? If yes, why?
Have you used xml check point in your project? How?
Why qtp the best testing tool?
Hi Friends... By using QTP , can we test .net products...and that product supports different languages.. thanx in advance..
Explain about the test fusion report of quicktest professional?
Can we create a qtp test from qc?
Shall we add Local Repository to shared object repository,if yes,how we add
what is the diff between manual test plan document and automation test plan doc.can u explain indetail.
Hi Frenz... I would like to take up the QTP certification . Can anyone tell me what is the procedure. n if anybody have the study materials pls fwd it to jkpunathil@gmail.com
what is Property......End Property loop? how to write sript for it in QTP
What is the extension of the qtp local repository? If it is .mtr then what is .bdb extension stands for?