I came across Good question ..... Write a script to only
download pdf's if there are 20 links on a page. Kindly reply
these type of questions are pretty challenging..

Answer Posted / trex

Set oLink = Description.Create
oLink("micclass").value = "Link"

Set oPage = Browser("title:=.*").Page("title:=.*").ChildObjects(oLink)
PdfCount = 0
For i = 1 To oPage.Count-1
oPdfFiles = oPage(i).getROProperty("url")
print oPdfFiles
If Right(oPdfFiles,4)=".pdf" Then
MsgBox oPdfFiles
count = count +1
End If
Next
MsgBox PdfCount

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is business process testing(bpt) in qtp?

682


What the differences are and best practical application of Object Repository?

579


What is the significance of “action 0” in qtp?

561


What is the synchronization point in qtp?

555


What is the extension of QTP local Repository? If it is .mtr then what is .bdb extension stands for?

570






How do you handle multiple banners(at the top the page, the banner is scrolling) in a web page(Dont take the name property(regular expression))

1662


What is RTM (require ment tracebulity marix) fromate?

1517


How can you identify the browser and its information using QTP script?

540


How many types of recording facility are available in quicktest professional (qtp)?

597


What is regular expression?

571


An action has both shared and local or associated to it and both have the same object in them. In the test which one will be considered?

648


what is meant by source control?

1685


What is qtpro? What is quick test pro?

552


HI Everybody, I am using QTP 9.2, I have a problem and hope everybody help me solve it. Now I need to use mouse wheel event to zoom in or zoom out in web client, but QTP can't catch this event. I look forward helping of everybody. Thank you very much.

1614


Give me detailed theritical explanation about keyword driven, hybrid framework, environment variables, hybrid frame work

1436