Suppose there is a link present somewhere in an excel sheet.
Find the link and click on it. How to write a script using
Excel application object in QTP?
Answer Posted / anup muralidharan nair
'Assume the link present in excel that you want to click is
'www.google.co.in
set oxls = createobject("excel.application")
set obook = oxls.workbooks.open("D:\excel.xls")
set osheet = obook.worksheets("sheet1")
'Retrieve all the hyperlinks within the sheet
set ohyper = osheet.hyperlinks
for each hyp in ohyper
If hyp.name = "www.google.co.in" Then
hyp.follow
End If
next
'close the book and release the excel object
obook.close
set obook = nothing
set oxls = nothing
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
How QTP support all types of applications (platforms)?
What is the difference between Keyword Driven test and Data Driven test?
What are the types of environment variables in qtp?
How to use checkpoints in qtp ?
Can you write a script to check if the folder exists or not?
Client is able to provide budget..he want you to choose the automation tool for the web application? which one you will select ? QTP or Selenium ? what are the reasons?
Hi friends did any budy attend accenture system test for qtp? if any budy pls drop questions.not only accenture any other mnc company which you attended system test(QTP)?it may helpful to others also
How is the Bitmap checkpoint different from Image checkpoint?
What is the difference between rational rose and QTP?
What is a reusable action?
How to use userdifined environment variables.Once we created in Environment tab which is at File--> Settings-- >Environment-->Userdifined
Hi , I am facing issue QTP 10.0 with oracle ERP 11i .When QTP opens,click sub links on ERP ,FORM is not opening getting unexpected Internet explorer error message with send or don't send report.So unable to work with forms using QTP.
How will you test a keyboard?
what is the latest version of QTP? Main difference between 9.2 and 10 version
what is object and child object.. explain ..if possible give some example for better understanding ..