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 / harsha

dim objIE
Set objIE = CreateObject("InternetExplorer.Application")
objIE.visible=true
objIE.Navigate "your url"
Set ObjDoc = objIE.Document
objhref=objdoc.documentElement.getElementsbyTagName
("a").item(0).href
if (Instr(objhref,".pdf")>0) then
objdoc.documentElement.getElementsbyTagName("a").item
(0).click
End if
This will download the pdf doc into the current opened
browser.

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between run time object and test object?

571


In qtp, how you can remove the spaces from string?

538


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


How to associate function library at a run time?

696


i need qtp tutorial. pls send it to sridhar.k151@g mail.com

1630






How qtp identifies objects?

559


Diff b/w Health care domain and Banking Domain?

4209


What is debugging? How you debug your script?

602


How the exception handling can be done using quicktest professional (qtp)?

562


What is the syntax to call one script from another? And what can be the syntax to call one “action” in another?

690


Object repositories types, which and when to use?

569


banking domain description for software tester for interview

3457


What is parameter in qtp?

674


How is UFT 11.5 version different from UFT 12.0?

600


What are the flaws in water fall model and how to overcome it?

555