Hello Everybody,
Can anyone tell me that in QTP how to count the number of
webelements from the object repository.
Please provide the code.
Thanks in advance,
Gaytri
Answer Posted / gaytri
Hi Seeths,
It is fine that we can use the child object property, I
also used the same, But the problem is that I want to count
the number of labels present in the specific page.
In addition to the above I also need that suppose:
1. I captured some of the labels of the web page.
2. Now in my script i used
Set oweb=Description.Create()
oweb("micclass").value="WebElement"
set lists=browser("Yahoo!").Page("Yahoo! Mail - The
best").ChildObjects(oweb)
numberoflists=lists.count()
msgbox(numberoflists)
this will display the number of webelement of the above
specified page.
3. I want if that webelement exists in the Object
Repository then it will add it to the list. and thus count
all those webelement that also exists in the Object
repository.
Thanks,
Gaytri
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How many add-ins comes by default with quicktest professional (qtp)?
Hi all, I am using windows vista, I am in the process of learning QTP. When ever I try to work with insert mode in flight application , i am getting the error of 'Operation must use an update table query, fractional truncation(null) error. Can anyone help me regarding this?
Explain how you can find length of array in qtp?
How should I click on the right click menu objects When I trying to add the object properties to the OR.It is showing only Window(Window).Not all the objects of the window. Also while recording I found No script. How to solve this>.
what is the difference between built-i function and In-built function?
whenever U using QTP,Test Director, Why we using separate Bug tracking tool?
How is a Step generator used in UFT?
How we can import data from database?
How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s. What is the difference between them? How to handle script issues?
How to analyzing test results using quicktest professional?
supose i hv to acsess some functionlaties of a test in 1 machin , some part other machin how can acsess?
How do Parameterization and Data-Driving relate to each other in QTP?
What is the keyword view and expert view in qtp?
Hi, how can we check or avoid the memory leakage in QTP9.2?
what function you write to do database testing with the help of qtp?