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?
Answers were Sorted based on User's Feedback
Answer / 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 |
Hey Buddy!!!!!!!!!!!!!!
i want to know the possible method to find out how index no.
is recognize by qtp as per appearance of object in
application and you just explain to declare a object there
property and method with the help of descriptive
programming............
that's not my question........
Is This Answer Correct ? | 2 Yes | 3 No |
Answer / pravesh
Set br=description.Create
br("micclass").value="Browser"
br("title").value="Welcome:.*"
Set pg=description.Create
pg("micclass").value="Page"
pg("title").value="Welcome:.*"
Set obj=description.Create
obj("micclass").value="Link"
Set objv=Browser(br).Page(pg).ChildObjects(obj)
cnt=objv.count
msgbox cnt
For i=0 to cnt-1
msgbox Browser(br).Page(pg).Link("Index:="&i).GetROProperty("name")
print "Index:="&i
print Browser(br).Page(pg).Link("Index:="&i).GetROProperty("name")
Next
Is This Answer Correct ? | 0 Yes | 1 No |
Answer / ira
Set oLinks = Description.create
oLinks("html tag").value="A"
oLinks("visible").value=True
oLinks("outerhtml").value= "<A class=l.*"
set tLinks = Nothing:
set tLinks = Browser("name:=.*Google.*").Page
("title:=.*Google Search").ChildObjects(oLinks)
a= tLinks.count
For i=0 to tLinks.count-1
strUrl ="" : strUrl = tlinks(i).GetROProperty("innertext")
Next
Is This Answer Correct ? | 1 Yes | 10 No |
Can anybody help me by sharing the code for checkbox in qtp using vbscript.
Hi, When I click on a hyperlink a secondary pop-window will open. In that pop-up window there will be 'N' number of records arranged in with paging option in datagrid table. Each rows contains two columns, one is text and the other is a radio button. I will pass the first column value and based in it the tool have to select the corresponding radio button in that row. Please someone help me how to handle this as am new to QTP.
What is Virtual Object? Plz Explain me with an example?
I have to automate webpage. If I click one hyperlink2 it will take 2 hrs to open. How to automate hyperlink2?
4 Answers Cap Gemini, Polaris,
How QTP identify the system time that's changes every seconds?
How to use Environment parameterization in QTP? Explain with an example.
Distinguish between manual testing and automation testing
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)
if Object repository contain x and y properties. we do not know whether they are mandatory or assistive properties. While executing the script qtp will use both the properties or only sufficient properties to identify the object. It means it use OR (or) AND
How can we get the result from WindowsXP Command Window? (e.g. After we input 'ipconfig' in command window, how QTP get the result?)
What's Checkpoints for QTP?
how can i call an external action,which is not added external action of an action?