Write a QTP script to print all the link names displayed in
a web page

Answers were Sorted based on User's Feedback



Write a QTP script to print all the link names displayed in a web page..

Answer / xyz

set linkObj=description.create
linkObj("micclass")="link"

set linkChildObj=B().p().childobjects(linkObj)
childCount=linkChildObj.count

for i=0 to childCount-1
linkName=linkChildObj(i).getROProperty("innertext")
msgbox linkName
next

Is This Answer Correct ?    51 Yes 10 No

Write a QTP script to print all the link names displayed in a web page..

Answer / siba

set linkObj=description.create()
linkObj("micclass").value="link"

set linkChildObj=Browser("Google Accounts").page("Google
Accounts").childobjects(linkObj)
childCount=linkChildObj.count
msgbox(childCount)
for i=0 to childCount-1
linkName=linkChildObj(i).getROProperty("innertext")
print( linkName)
next

Is This Answer Correct ?    16 Yes 2 No

Write a QTP script to print all the link names displayed in a web page..

Answer / mani

go to any web page click on any link..store it in OR
manager...Then according to the browser name and page name
write the script
Example:


Browser("name").Page("name").weblink
("destination").GetROproperty("number of links")

Is This Answer Correct ?    11 Yes 16 No

Write a QTP script to print all the link names displayed in a web page..

Answer / bidyut prava

Browser("name").Page("name").Link("destination").Click

Is This Answer Correct ?    4 Yes 11 No

Post New Answer

More QTP Interview Questions

anyone can explain the following concepts. 1.diff b/w Linear and modular framework 2.diff b/w keyword and hybrid framework

1 Answers  


how to automate standalone infopath forms using QTP? (it is not a dotnet or a web form)

1 Answers   ABC,


How do we Access, retriew and edit the runtime objects in Automation Testing using QTP

3 Answers   IBM,


How do you open adobe acrobat file in QTP and do some testing on that file ?

0 Answers  


In Webtable New rows getting added, we have select the name as Sandeep ,If name column is sandeep then need to check the checkbox ,we don't know the rows and columns ,Can anyone please tell me the answer.

3 Answers   Broadridge, Cigniti Technologies, HCL,






whenever a scenario is recorded ever, it creates a object repository automatically (‘per action’ /local ). we do not need to make them individually…then why we need a shared object repository. How it will be practically utilized ?? your input will be highly appreciated..

5 Answers  


Syntax for how to call one script from another? and Syntax to call one "Action" in another?

2 Answers  


How to get line numbers in your editor in expert view?

1 Answers  


I AM TRYING PORT CODE FROM WINRUNNER TO QTP AND DON'T KNOW TO HOW TO CHECK THE ERRORS. IN WINRUNNER FUNCTION RETURNS EIGHER 0 OR -1 AGAINST WHICH RESULT CAN BE MADE PASS OR FAIL BUT IN QTP I DON'T SEE FUNCTIONS RETURNING ANY VALUE. APPRECIATE IF ANYONE COULD HELP ME CONVERTING FOLLWOING WINRUNNER CODE TO QTP. set_window("Customer Service"); rc = web_obj_get_text("Summary","#2","#4",ssn,""," ",1); if (rc != E_OK) { report_msg("[GetSubscriberSummary] Could Not get subscriber SSN; rc = "&rc); myRC = rc; } else { ssn = StripBlank(ssn); if (DEBUG) report_msg ("[GetSubscriberSummary] SSN: "&ssn); }

0 Answers  


how will u choose a tool for test automation ?

1 Answers  


Connect to QC using AOM.

0 Answers   Deloitte,


what is the Command used to start the QTp from Run.(start-> Run)

7 Answers   GE,


Categories