Write a QTP script to print all the link names displayed in
a web page
Answers were Sorted based on User's Feedback
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 ? | 52 Yes | 10 No |
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 |
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 |
Answer / bidyut prava
Browser("name").Page("name").Link("destination").Click
| Is This Answer Correct ? | 4 Yes | 11 No |
We need to verify the user name & password in for the user validation. But we don't want to use the parameterization/ loop for user name and password. What is the way in scripting so that user & password will generate automatically.
In a web page, one web table is present which is dynamic. In that table one of the column has links with the same inner text. write a script so that i need to click the third link.
Does we use Classes and methods in realtime..?How wud we access methods in a class..?Thanq Guys..!
how can i call an external action,which is not added external action of an action?
write a regular expression pattern for xyz?123?
if we can find the status of script in qtp that either it's pass or fail then why we need to put this status on different excel file or log file in hybrid framework .please let me know asap thanks
What is the main differece between QTP 9.0 and 9.2
Explain QTP using different development techniques ?
How we will execute(run) the scripts in qtp 8.2?
How to do the Mouse Operations in QTP. How to aacess an Image in a web application to save it on my desktop. To my Knwoledge that can be done by mouse right click on the Image and selecting 'Save the Image'option. Or Is there any alternate way to do this..
can we call a test in another test? how? explain with one example?
what is use of the object repository?