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 test settings and global settings?
How will you declare a variable in qtp?
Describe synchronization point.
Can we record using all the modes in a single script? Explanation with example is appreciated
Which functionalities of QTP used in banking project?
How many types of recording modes in the qtp?
Suppose I want fail that check point? How can you do that?
Can we create user defined functions in qtp?
I am getting an error "failed to open the XML checkpoint result viewer" in result window,after clicking on "View XML checkpoint results".Someone suggest me settings,if any...
What is keyword view?
What is qtpro? What is quick test pro?
What are the two types of repositories available, explain them?
What are the different types of recovery operation?
Can I change properties of a test object?
what is the difference between rational rose and QTP? WHICH TOOL IS BETTER TO LEARN? PLEASE SEND ME AT sana_50218@yahoo.com sandeep@epuratech.com