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
supose i hv to acsess some functionlaties of a test in 1 machin , some part other machin how can acsess?
What are the key elements available in test result window?
Define Canvas view of UFT?
How can we import into Excel "Details" ,"Result" ,"Time" parameters from within a Results Report which is generated after a Run error when a script is executed in QTP? Refer E.g below Status Functionality Description RunDate Fail Login User should be able to Login 12/3/2007 StartTime EndTime Details* 1:31:58 PM 1:32:29 PM (this one i want)
How to write business scripts using object repository with different scenarios
How can i test an application like Google Earth.In my application data will be fetched from a oracle database based upon which graphs are generated..so these all are dynamic..how can i use qtp here..alongwith that how can i test the map generated by a satellite just like google earth..
Could you please any one give code for the following ? Scenario : Suppose a excel file contains 10 records and earch have 5 fields. how can i input this excel file for datadrive wizard ? Please explain
How to create Reusable and Multiple Actions?
can any body tell me how i create a simple script and apply output value on it .pls send me a step by step process
Explain different types of checkpoints?
What is QTP and the use of QTP in TD?
How to call a test from another test?
I created 3 actions in test suppose I want to run action 1 in single time, action 2 is 4 time what I do?
what is the diff between manual test plan document and automation test plan doc.can u explain indetail.
Explain the concept of object repository and how quicktest professional recognises objects?