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 / 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 |
I am just a beginner in QTP. Could any one explain me in detail how to automate adding two numbers and getting the result in QTP. Also I would like to parameterize the inputs. I have tried but getting an error like 'Can't use sub.....'(can't recollect the exact error)
what r the main attributes of test automation?
how can we write descriptive programming for menus when qtp is not able to identify it..and how can we write descriptive programming for partially identified and non standard objects..do i have to map the objects before writing the script
I used child objects to get the no of weblist present in the weblist.now i need to select the items present in each weblist ?How to do so
tell me exact differenceb bw qtp and selenium?(could not tell open soure and licennce? difference in usage and technical difference?
In a webtable,a list of values are there,rightnow one values shows,later random another values shows,but how to retrieve the random value in webtable.
Explain types of descriptive programming?
HOW MANY WAYS ARE THERE TO CPY TEST IN TEST LAB
Inserting a Call to Action is not importing all columns in Datatable of globalsheet. Why?
Actually How do we use this Smart Identification Technology during Recording mode.
In QTP if u got a defect , how to report to developer using Test director or Quality center .
I have the script like this: Browser("Login").Page ("Application").Frame("ScopeFrame").Link("DC3701737 (Active)").Click in which the value "DC3701737" will get changed and i have to use the same value in so many places. I got the value "DC3701737" in to a variable(Say x). Now if i want to pass the variable in to link object .. how? Browser("Login").Page("Application").Frame ("ScopeFrame").Link(x).Click Is it possible to pass any variable into a link object .. so, that the application will select that link automatically? If ur not able to understand, pls let me know.