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 / 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 |
Post New Answer View All Answers
How will you report the bug and explain the defect tracking sheet you handled?
What are the check points can be inserted without recording?
How to save your test using quicktest professional (qtp)?
What is the difference between local and shared object repository in qtp?
what is the advantages and disadvantages of using functions instead of re usable actions
How to automate a script in mainframes environment? I have the terminal emulator Add in. Describe in detail.
Does QTP10 supports Windows 7OS +IE 9 combination? Which is the preffered combination ,Plz let me know?
What is the diff between image and bitmap check point?
How to do call a output parameter from one action to another action??/
I created 3 actions in test suppose I want to run action 1 in single time, action 2 is 4 time what I do?
What is the significance of “action 0” in qtp?
What are the steps involved in recovery scenario wizard?
I used the below code to open QTP through VBscript?But i can unable to Invoke QTP...PLZ help me with the correct code to invoke QTP through VBS with description of the code aswell. Dim qtApp 'As QuickTest.Application 'Declare the Application object variable Dim qtTest 'As QuickTest.Test 'Declare a Test object variable Dim qtResultsOpt 'Declare a Run Results Options object variable Set qtApp = CreateObject("QuickTest.Application") 'Create the Application object qtApp.Launch 'Start QuickTest qtApp.Visible = False 'Make the QuickTest application visible qtApp.Open "C:\form", True 'Open the test in read-only mode 'set run settings for the test Set qtTest = qtApp.Test qtTest.Run 'Run the test 'WScript.StdOut.Write "Status is: " & qtTest.LastRunResults.Status 'Check the results of the test run qtTest.Close 'Close the test qtApp.quit 'Close QuickTest Pro Set qtResultsOpt = Nothing 'Release the Run Results Options object Set qtTest = Nothing 'Release the Test object Set qtApp = Nothing 'Release the Application object
what is the difference between modular framework & datadriven framework
How many scripts did you have?