How to write a general script which should does the
following
a). If a page object is given, it should identify the page
object of the corresponding page(site).
b). It should identify all the links of that particular
page.
in QTP tool?
Answers were Sorted based on User's Feedback
Answer / arun
if page object is given then..
eg> set pgObj = browser(yahoo).page(yahoo)
pgObj - is the page object
Answers:
1. we can check for the page as follows
tmpPageName = pgObj.getroproperty("name")
if tmpPageName = "Yahoo" then
msgbox "Found the page"
else
msgbox "Page Not found"
end if
2. Need to use description.create function
set descObj = description.create
descObj("micclass").value ="link"
set lnkObj = pgObj.childobjects(descObj)
msgbox lnkObj.count '// This will give you number of links
found in that page
| Is This Answer Correct ? | 5 Yes | 2 No |
Answer / isha menon
I dont know the rite answer for this question,. But this
question will be very much useful to know more about the
main testing tool QTP,.
| Is This Answer Correct ? | 0 Yes | 2 No |
We have 1 web page with names column. I am giving the Service Providers1,2,3.... @ that time dynamically some no of names are displaying in the webpage and The Pop up windows are opening(No.of Pop Up windows=No.of Names). The names may be diffar for each and every Service Provders (Dynamically) How can we handle the Dynamic values?
What are the data types supported by vbscript?
How to remove the spaces in a string Ex: "this is apple"
I have string like hp company.print tis like company hp.write a program in vbscripting
What is the purpose of drive object of scripting.filesystemobject class in vbscript?
write a vb script to generate fibonnaci numbers
Explain about operator precedence in vb script?
How to open a file. What is the perpose of true and false mode there?
How will you generate Reports using Vb Script?it asked in testing(QTP)Interview.Plz Any Body Let me know. Thanks uday Uday_testing@yahoo.co.in
Why do we use Option Explicit?
What is the difference between javascript and vbscript?
How to assign a numeric value to a variable?