Pls anyone, tell me the script in QTP to find the number of
links, and images in a webpage. Verry very urgent. I
shall really be very thankful

Answers were Sorted based on User's Feedback



Pls anyone, tell me the script in QTP to find the number of links, and images in a webpage. Verry..

Answer / hemakumar.m

'For Links
Dim oLinkDes
Set oLinkDes=Description.Create()
oLinkDes("micclass").value="Link"
a=Browser("title:=.*").Page("title:=.*").Childobjects
(oLinkDes).Count()
Msgbox a

'For Images
Dim oImageDes
Set oImageDes=Description.Create()
oImageDes("micclass").value="Image"
a=Browser("title:=.*").Page("title:=.*").Childobjects
(oImageDes).Count()
Msgbox a

Is This Answer Correct ?    9 Yes 0 No

Pls anyone, tell me the script in QTP to find the number of links, and images in a webpage. Verry..

Answer / hemakumar.m

oLinkDes=Description.Create()
oLinkDes("micclass").value="Link"
a=Browser("title:=.*").Page("title:=.*").Childobject
(oLinkDes).Count
Msgbox a

oImageDes=Description.Create()
oImageDes("micclass").value="Image"
a=Browser("title:=.*").Page("title:=.*").Childobject
(oImageDes).Count
Msgbox a

Is This Answer Correct ?    7 Yes 0 No

Pls anyone, tell me the script in QTP to find the number of links, and images in a webpage. Verry..

Answer / guru

You use Page checkpoint

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

In my Script Firstly i have to parametrize the data then we import the data from c drive.suppose i have parametrize the Person name and company Name and i have enter one person name and one company name in the excel sheet now we import the sheet and the script is passed i want to ask one thing can we add more than one person name and more than one company name in the excel sheet suppose firstly we create person name "ADDy" and company nmae.'Wipro" and we set the current row in the script for this data and now we want run the script another set of data so how we can run the script with another set of data

2 Answers  


what is frame work?

2 Answers   Wipro,


how can we retrieve ten rows from the data table using loop concept?

4 Answers  


hi, i was adding the two numbers in qtp scripts but i didn't get the answer. see my below script, i dont know wht is the problem. i passed the value a=3 b= 2, i got the ans 32 instead of 5. i thing the problem is to be c = a+b my mail id karthis4u@gmail.com Dim a, b, c a = inputbox("enter the a ") b = inputbox("enter the b ") c = a + b print c

8 Answers  


How to make arguments optional in a function?

2 Answers   Crea,






Suppose u write test case in Excel sheet . how u open that test case in Test Director?

4 Answers   Ordain Solutions,


Can we access the java methods in qtp. Because my requirement is to access the swt(for eclipse an it is java code) methods in qtp is it possible?

0 Answers  


What is test fusion report?

2 Answers   CIL,


Hi, I have weblist which contains the data like Design change,admin edit and cost saving etc.. User doesn't know the values existed in weblist. Now the user has to select the right value from the list otherwise the test will fail. Pls help me "To select the correct value from the list"

1 Answers  


does QTP provides any tools for parametrisation?

4 Answers  


Hi, how can we retrieve a specific value from Excel Sheet (Not datatable. for externel file).i mean to say from .xls file. and also tell me from xml file and .doc file. and how can u parameterize ur script from .xls file.(Not data table).

2 Answers   Cap Gemini,


Hi All, I have QTP installed on my machine but the application under test (AUT) is on remote desktop.My scenarios is like that,it should contain following steps. 1)Automatically it should click on start and then on remote desktop connection. 2)it should enter the IP address and then connect to remote desktop. 3)and then it should be able to record the application in remote machine and then run it also. Can somebody tell me how to record the application which is in remote machine.

0 Answers  


Categories