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
Name the different types of recording modes?
While spliting an action in QTP 10.0 getting an error : "This Line is a part of Script Block.You cannot split the action on this line." how to re-solve this and split the script into actions?
write the vb script for call to new action in qtp?
What are advantages of test automation?
How QA specialist can identify when programmatic descriptions are useful?
Explain how Does Run time data (Parameterization) is handled in QTP?
in data driven testing for performing operations which method is easy from manual test data,keyword view,or from database.and why?
How are actions and functions different in QTP?
Can anybody post some real time scenario in qtp? please its very urgent.
we use a file extension .properties why is it used and where do we use it plz help me out with detailed explanation and navigation of how to use on the QTP 8.2?
when will you do debug your script? and explain that process?
What are the differences between quicktest professional and winrunner?
In the Hybrid framework, data can access the database, excel file, XML etc. Is it true?
How to test login module with different username and password by using data driven testing in QTP?
How qtp identifies objects?