if the excel sheet specified in script is not there,we get
run time error how to handle the error ,please anybody
explain me in detail
Answers were Sorted based on User's Feedback
Answer / veeranki naveen
On error resume Next
err.clear
set Excl = createobject("excel.application")
set Workbook=Excl.Workbooks.open("C:\Folder\ExcelFile.xls")
if err.number <> 0 then
msgbox "Excel Sheet is not present at the specified path"
End If
OR
set fso = createobject ("scripting.filesystemobject")
bol = fso.fileexists ("C:\Folder\ExcelFile.xls")
if bol = false then
msgbox "Excel Sheet is not present at the specified path"
End If
msgbox
| Is This Answer Correct ? | 1 Yes | 0 No |
What are the different scripting languages you could use when working with QTP ?
In your QTP framework, what checkpoints were applied in the script to minimize script failure due to any reason during execution?
whenever U using QTP,Test Director, Why we using separate Bug tracking tool?
Anybody wants to learn QTP with realtime implementations and complete framework desiging plz contact to this mail id ciraaj@gmail.com
How to add a runtime parameter to a datasheet?
In qtp, how you can remove the spaces from string?
Can we continue functionality testing without framework?
Does QTP support Java Script also. Which is one is preferrable for QTP, VB script or Java script
There is one parent browser and 'n' number of child browsers on desktop. Write a code to close all the child browsers but parent browser should not be closed.
New to QTP: In a qtp flight booking application, I tried to parameterize the to and from drop down lists using data table, depending on ur drop down selection it will pop up a list of flights. Here I am not finding a way to select flight randomly from given list... Thanks in advance guys.
How many scripts did you have?
1.what is the difference between childobjects and child items in qtp? 2.what is difference between a class and function? 3.can u convert ustimings to indian timings using vbscript? 4.i have scripts in one machine.can i run those scripts in another machine.how?
2 Answers Genpact, Infosys, Symantic Space, TCS,