Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are test settings and global settings?

1029


How will you declare a variable in qtp?

945


Describe synchronization point.

1079


Can we record using all the modes in a single script? Explanation with example is appreciated

1796


Which functionalities of QTP used in banking project?

2390


How many types of recording modes in the qtp?

1031


Suppose I want fail that check point? How can you do that?

1049


Can we create user defined functions in qtp?

954


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...

1984


What is keyword view?

952


What is qtpro? What is quick test pro?

999


What are the two types of repositories available, explain them?

969


What are the different types of recovery operation?

961


Can I change properties of a test object?

1081


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

2744