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



How to write a general script which should does the following a). If a page object is given, it ..

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

How to write a general script which should does the following a). If a page object is given, it ..

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

Post New Answer

More VB Script Interview Questions

What is the difference between for loop and while loop?

0 Answers  


How can I access an object in another frame?

1 Answers  


How to scroll down a page while recording in qtp. suggest me any method apart from low level recording.

0 Answers  


How will you get the smallest subscript of an array in vbscript?

0 Answers  


generic function for webedit box for web application

1 Answers  


How to identify column in VSFlexgrid? My VSFlexgrid window is identified as 'Active X Control'

0 Answers  


If anyone knows abt Test Complete material, Pls let me Know. if u have any material or any documents..... Pls mail me on this mail Id...... This is very Urgent Requirment..... for my Project.....

3 Answers  


Explain the difference between POST and GET Method.

1 Answers  


Can automation testing find ssame no. of bugs what we can find by manual testing?

0 Answers  


How to search word in a string without using instring function?

1 Answers   CSS Corp,


Could Anybody tell me the VBscript for REVERSE an Integer int reverse(int num) Ex:246 to 642

7 Answers   Amazon,


How can I get the value of an object property or variable in another frame?

1 Answers   Citi Bank,


Categories