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
What is business process testing(bpt) in qtp?
Explain features of the latest version of qtp/ uft 12.1?
What are the different types of recording modes in qtp? Which will be used when?
Write the script to delete the mail which is at 9th,13th and 18th place in INBOX of Gmail ?
How many add-ins comes by default with quicktest professional (qtp)?
What does mean by Scope of Automation?n How we defined it?
Generic function to search for the unique link in webtable and click on it
How will you declare a variable in qtp?
Difference between action & Reusable action?
How can we use the "CreateObject("Shell.Application")" in QTP and what is the definition and purpose of it?
after click on compose mail how can we attached a file in qtp with vbscript code
What r the different filters in defect in quality center
what is meant by source control?
can the activities of test case design be automated?
Our company is having a windows client server application developed in vb.net. so there is a treeview and i am not in a position to record the click events in QTP. so kindly help. Vivek