How Exactly we can find out the INDEX No. of any object of
an application when we test that application in QTP? Explain
this by giving me the example of all LINKS of G-Mail
(including home page, User-account page and all possible
pages you ever seen in G Mail)?????? and if your answer is
that as per appearance of objects(LINKS) in application we
can find out the index number in application then tell me
how you find out which object(LINK) having INDEX No. 1,2,3
and so on and how you say which object(LINK) is appeared
first and which is last?
Answer Posted / udham
Hi
I also faced the same question .i tried hard 2 find the solution but didn't get anywhere .i tried many times with QTP.
This is the solution which i get.
this will tell u the index no. at execution time.
This is not the exact answer .this is called programming jugad.
set c = description.create
c("micclass").value = "Link"//i m using link only .u can use any other object type also.
set obj = b().p().childobjects(c)
msgbox obj.count //will give the count of all links on page
for i = 0 to objcount-1
b().p().link("index:="&i).highlight//this will highlight the link with index no 0 in the application as initiallly the value of i is 0.
msgbox i //printing the value of index
next
| Is This Answer Correct ? | 8 Yes | 2 No |
Post New Answer View All Answers
Do you know how to connect database? Can you tell me the procedures?
Can any one say what exact diff between test->parameters, action properties-> parameters. after defining the parameters in test->settings, how can we access those parameters.(i know how to use action prop parameters)
Suppose I have three hyperlinks with same properties. How to solve this and what are the ways to solve this. we can solve this by using index property but what are the other ways we have have to solve this problem. Login (href: btnlogin.aspx) Login (href: Sourcelogin.aspx) Login (href: homelogin.aspx)
Explain how qtp identifies object?
i have two questions for regular expression :- Q1. I have date pattern eg-29/11/2011 29-11-2011 29.11.2011 Que- if any separator is there between date,month and year pattern should match else it should not match eg- pattern should not match in case of 2911-2011 Q2. let say i have a string and there is a number in between of that string eg.-Amount 30002.234 successfully credited to your account . now i have to match this pattern in such a way that even if decimal is not there pattern should match ,how i will do this using regular expression
Why is action split used by qtp?
is it possible to add sheets to excel at runtime
what is the diff b/w assistive and mandatary rules of object repository in QTP???
what is command for executing files?
What are the differences between table and db checkpoints?
Explain the concept of how quicktest professional identifies object?
What test cases can you automate using QTP?
What is the difference between keyword view and expert view?
Can any one explain me what is the procedure to connect the remote desk by using QTP 9.2 ?
Please help me by providing the License key for QTP 9.2, at guru_aarya@yahoo.co.in Best Regards Gururaj.B