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 |
How do you learn the object in QTP?
what is batch run ?
Whether qtp 9.0 supports Test director8.0
What are the disadvantages of recording test cases in qtp?
What are the difference between QTP and Winrunner
In QA Testing when do you use Loadrunner vs QTP? What are the main differences between those two tools? Explain the purpose with real world scenario examples...In advance thank you!!!
How the smart identification is used in real time?Please explain with an example
Why divide a test into three action calls?
how can we test load time of an page in webtesting?
interviwer asks what is data table? my ans is Data table is an internal Excel file of QTP...intervier not happy with this also? can u post any other answer?
how can we handle exceptional handling in qtp
1.what is the extension of action template? 2.what are the strengths and weaknesses of Keyword driven framework? 3.how qtp identify runtime objects?