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 |
What purpose does ‘on error resume next’ serves?
how to declare a variable in vbscript using vbscript
how to automatically update the sql server2005 database records when insert in vb6?
HOw we can apply web service checkpoint in QTP 9.5? I tried it out with net connection also. But not getting success.
Why is the use of exit do or exit for statements within loops discouraged?
How regexp.execute method works?
What is the event handling in vbscript?
Mention what is variant in vbscript?
Could Anybody Please tell me What is the script for Find 3rd Largest element in the Array without using a SORT function int Find(int arr[], int size); Thanks in Advance..
write a vb script to open a text file and write into it
What is the difference between do until loop and do while loop?
There are 5 web pages.write a script to click the button on 4th web page.