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?
Answer Posted / 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 |
Post New Answer View All Answers
What are the disadvantages of vbscript?
How can you destroy an object in vbscript?
Which operator is used to concatenate the 2 values in the vbscript language?
1) How can we use VB script in testing the application? 2) What all are the things(Software application to be installed in PC) we need to learn VBscript?
Can someone please tell me what poor design in a relational database (not the layout or style) is and how it can be avoided? PLEASE...im desperate.
Explain few date functions in vbscript?
What are the different types of operators and their order of precedence?
What are class variables?
what is event handling?
Explain about adodb.stream class?
after medical test,when will be the police verification
Explain a few date functions in vbscript
What is difference between vbscript and vba?
What are the environments supported by vbscript language?
Hi anyone Can Send Solution to the Question wt m posting now Prepare Script for the Bellow Scenario? Login to Gmail Page Open Inbox check Mails save them in a Folder