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 can i initiate the objects to find uniquely in OR
How to analyzing test results using quicktest professional?
What is checkpoint in qtp?
What is the difference between a Function and Procedure in QTP?
What is the use of text output value in quicktest professional?
hou can we use vb script in qtp could u tell me breafly
descriptive program for a yahoo mail that is in yahoo mail suppose check box mailid subject assume it is like this format all things are in webtable the question is suppose some mail ids are there in that mailids i want to select the check box wich is before a@gmail.com and after that i want to click on delete button
Why do we use breakpoints in QTP?
X flies from Hyd to bangalore using different methods of transportation. write the test scenarios and test cases for this?
give me an example where u used good judgement and logic in solving a problem
How do I lauch my test website using code from qtp in different environmet, uat and PPTE?
Hi, I am using 2 excel sheet.First excel sheet works fine with the script, if it opens the 2nd excel sheet,it works fine,but after finish all the rows it is giving the following error in the following line. InValid Procedure call or argument Line (178): "Browser("name:="&result,"application version:=internet explorer 7").Page ("title:=bgt.*", "index:=0").WebList ("name:=SearchType","html id:=Select1","location:=0").Select SearchType1". I have seen a web article says that,If we use any vbscript friendly name it may gives the above error-Invalid procedure call or argument not sure,Am I using any VBScript frienlyName? in the above line? [but the same line is perfecly working for first Excel ] It is little urgent. Any Help Thanks you
What is output value? How many types of output values are there in qtp?
hi in real time who will execute the qtp test scripts? my faculty said, in a companty automation testers are written the test scripts and manual testers are execute the test scripts...IS IT RIGHT OR NOT?
Hi How to retrieve data from web element line by line?