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 can we change(increase or decrease)the size of a array variable with out loosing the previous values
1 Answers DST Global Solutions,
What is the difference between a Function and Action in QTP?
How to get the format of a webedit class in qtp. How can i know that particular webedit accept what type of format like "mm/dd/yyyy" or "$" or Alphanumeric
How to start recording using quicktest professional (qtp)?
What are the views available in quicktest professional (qtp)?
can any one please tell me QTP 9.2 supports which version of IE and Mozilla firefox.
Could we use QTP for java project(Which is develop in Netbeans and My SQL) otherwise which one is suitable?
how to use the QTP choose the data from oracle? e.g. i input the identity card NO. this will be add new record in the database ,and now i want get this record's prime key.
What is the difference between Accessibility Checkpoint and Bitmap Checkpoint in QTP? Note: I have read it in QTP help but i dont want answer from that.......
How can you pass value one action to another action?
does QTP provides any tools for parametrisation?
is we can import the object repository from external source. if it so then how?