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
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 |
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 |
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 |
How do you invoke any application and write a script to invoke QTP using VB Script.
Why divide a test into three action calls?
Could any one explain about the nested actions in QTP? This question is asked by Qualitree and CA
3 Answers CA, Qualtree Solutions,
Does QTP10 supports Windows 7OS +IE 9 combination? Which is the preffered combination ,Plz let me know?
What is text check point and text area check point?
i need to learn the descriptive programming very well so for that what to do am reading the qtp user mannual but it is not so any materials or links with examples i want please help me
What is recovery scenario manager? When you go for recovery scenario manager? Tell me one scenario were your used recovery scenario in your project?
how to disable the pop ups through QTP using a script
what difference between runtime object and text object and what property they have. whether they have same properties or different properties.
what function you write to do database testing with the help of qtp?
What are the advantages of parameterization ?
I have written some scripts in QTP by using older version, but I want to run them in latest version. Is there any process to do that.If so can anyone explain me?