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
What are the steps involved in recovery scenario wizard?
How many types of recording modes in qtp? Which will be used when?
How to execute a winrunner script in quicktest professional?
If I change the object name in one action will it be updated in all the actions? Or not?
Explain quicktest professional (qtp) testing process?
tell me QTP standards ?plz
what is the hierarchy to use properties in descriptive programming
Dear All, How to generate Pass or Fail Report in QTP without using Reporter.Report Event Method ? Thanks Balaji
How many types of status are there?
What are the key elements available in test result window?
What is optional step in qtp? How you can add optional step in qtp?
What are the things(properties, and other details) will be recorded while recording an object using normal recording?
Hi frnds, does anybody know if there is anything called "thin point" or something in qtp? thanks in advance.
How can you close the second opened browser?
In Remote acess server how u run a test?