How will you send values to a cell in a webtable using QTP?
Answers were Sorted based on User's Feedback
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 |
What is AUT in object reposity in QTP? Why we use it in Object repository???What is full form???????
what are the environment variables,how do you use them. give an example.
Suppose Object name was changed in the application in the second build.I have just modified the name in the Object repository as changes in the Application. Is it possible to accure changes in the script accordingly? If so Suppose I am calling the script through function, Will the changes affect in the script(which is in the function)automatically? If not affected, tell me the solution,How to handle this. How should I change the object property name while using functions
How to connect to a database?
In qtp,how to interact tool & application build?
HOW TO DO THE BATCH TESTING USING QTP?
Which environments does qtp support?
Wht are the BY default Add-ins in QTP 9.2 version and what all are differences between 8.2 and 9.2
How many types of recording modes in qtp?
How do we retrieve the content from a text box in a web page
i don't have any experience in qtp? Can u please tell me What work i have to do?
Can I use datatable of Action1 in the Action2.