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

Answers were Sorted based on User's Feedback



Hello Everybody, Can anyone tell me that in QTP how to count the number of webelements from the..

Answer / seeths

hai gayatri,
we can count the no. of elements through Child
Objects.wich is advanced feature in Qtp..........

Is This Answer Correct ?    1 Yes 1 No

Hello Everybody, Can anyone tell me that in QTP how to count the number of webelements from the..

Answer / 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

Hello Everybody, Can anyone tell me that in QTP how to count the number of webelements from the..

Answer / srinivasulu

Hi Seeths

Gayathri is asking to you count of webelement using object
repositary, but u had given aswer is using Descriptive
programing, I think that is ans is wrong

pls let me know if any issues
my mail id is : vasuth2008@gmail.com

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

how to use import and export sheet methods in qtp

1 Answers  


Have you used xml check point in your project?

0 Answers  


how can you do retesting (datadriven test) using notepad amd by using functions NOTE u should not use datatable methods

0 Answers  


Explain how Selenium is different from UFT?

0 Answers  


Use of Debug Viewer?

1 Answers  


WHAT ARE THE DISADVANTAGES OF SHARED REPOSITORY?

9 Answers   BirlaSoft,


Can anyone explain about Keyword driven framework in detail and how to use it in case of any project

4 Answers  


Is there anyway to have QTP go into a website and map out every object before I actually record any tests? I basically want to map out a website with all the objects and build a complete repository. The reason is because I'm running into issues with hierarcical objects. for example: Browser("ABC company- Home").Page("ABC company - Home").Link ("About Us").Click Browser("ABC company - Page 2").Page("ABC company - Page 2").Link("About Us").Click Both these links ("objects" and I use that term loosely as I'm trained mostly in OO programming) go to the same place but but the object heirarchies (pages) are different. I want a repository that will find any possible link on any possible page without having to manually record it. Is there a way to do this?

1 Answers  


What are the steps involved in recovery scenario wizard?

0 Answers  


what are the drawbacks for record and payback in qtp

3 Answers  


I have to pass all the test cases into gmail userid and password using functions please give me code thanks have anice and greate day

2 Answers  


Hi,i have 3 years of experience in manual and Automation qtp.present i am searching for job in automation qtp 2Yrs,How to Explain the interviwer Roles and Responsibilites.please help me.

1 Answers  


Categories