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 are the Automation Limitations??
Hello everyone! I am just writing a small test for a windows application. I have a problem with a text output value. The value i am trying to catch is presented in a scrollable textbox. When the text is too long, only a portion of it gets captured. Do you have any experience with this?
how to compare two bitmaps( 1. clients requirement & 2. Designed by dev) in qtp 8.2 wann clear steps
Is it possible to map an image as standard Object or u've to treat as virtual? how to map an Dynamic image into standard object?
how are environment variables used in real time projects (testing)?what answer should be given about this in interview.need real time explanation breifly?thnx in advance.
How does QTP identifies the object in the application?
What are the enhancements u did after recording ur script?
Why is action split used by qtp?
write script for "dropdown button having how many words? for ex.SELECT CITY is dropdown name.. find out how many cities in that?
How to load the object repository at run time?
h u call the function
What are the types of object repositories? Which one is you using?