i ve an excel in a QC folder. Thru my QTP script i want to
open that excel in runtime. I am running this script from
QC itself
Answers were Sorted based on User's Feedback
Answer / karishma
got to options and select folders tab and give path of the
folder where the excelsheet is present in QC
and then try out this:
x=PathFinder.Locate("Results.xls")
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set objWorkbook2 = objExcel.Workbooks.Open(x)
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / saranya
hi manoj,
Try this. Even I am doing the same thing for my application.
First connect your QTP to QC. Then open the code which you
have saved in QC in QTP. Click on Test->settings(in QTP9.2
it will be File->settings) -> click on resource tab . In
that you can see a frame called DataTable. In that select
the option "Other Location" and click on the browse icon
beside that option. It will display you all the excel
sheets in QC. Select your Excel sheet. Now autopmatically
the excel sheet will be embedded to your code in
runtime.You need not include any code for this excel sheet
in your main code. (But do take care of the sheet names in
the excel sheet. It should be correctly mentioned in your
code.)
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / manoj
with that code we can open a new excel or even open an
excel that is saved in our system
but i want to open an excel (which is saved in Mercury
Quality Center ) during run time.
is there any piece of code to download the excel from
Mercury Quality Center to local machine during runtime?
| Is This Answer Correct ? | 1 Yes | 2 No |
Answer / giridhar reddy
Hi
try this one, I am not giving you the whole syntax because
if you start analyze you will get more information on this
right? thats why...
SystemUtil.Run "excel",""
if you have any doubts let me know
| Is This Answer Correct ? | 2 Yes | 12 No |
In my application there is a billing thru credit card. how to validate the credit card details(min balance,credit card no,card holder name).if these details are valid then only that booking will be done.how to validate these details thru automation or manual?
if we made any changes in shared object repository how it reflects of others like our team members?
what is L-trim function will do?
Tell me the situations where we will use Data Driven?
is qtp 9.2 supported for firefox browser3.0?bcoz when i tried to create scripts with the application run on firefox browser 3.0 then qtp 9.2 didn't ct=reate the scripts?
In qtp, explain what is qrs file?
Hi, I am learning QTP. can someone please tell me a site from where i can learn QTP scripting Thanks in advance
Mention the test steps of qtp.
I have a Webtable object in my shared object repository, say WT1, which has different index value in 2 different versions, one version having WT1's index value as 1 and other version having WT1's index value as 2. how could i use same test script to identify the WT1 object having different index values.
Could you suggest me best coaching for automation in Delhi or nearby area?
At a time how many users can access QTP?
I have 2 Environment variable which holds int. I called into my test and addedup. but output is concatenating the values instead of Sum. Ex. Envi("a")= 10, Envi("b") = 20, c= Envi("a")+ Envi("b"). msgbox c ( Ans.1020). How to overcome this pblm? I used the add fn also..