GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Tech FAQs  >  QTP
Go To First  |  Previous Question  |  Next Question 
 QTP  |  Question 88 of 648    Print  
I m setting the excel sheet path in QTP for importing as : datatable.importsheet "C:Qtpabc.xls"
but if the location of excel sheet path changes to for eg:"D:Data"...the script fails as proper excel sheet path is not given..can u plz suggest how to use a environment variable/xml file to remove data path hard coding??

  
Total Answers and Comments: 2 Last Update: July 06, 2007     Asked by: Anita 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
July 19, 2006 02:43:02   #1  
vasavi        

RE: I m setting the excel sheet path in QTP for import...

Hi,

    You can use Action and Test parameters to  parameterize the hard coded value of Excel sheet path, or even  you can go  for Environment variables.

Using Test and Action parameter:

  Follow following procedure

Go to Test Settings-> Parameters-> define the input parameters (for ex: path)

As Test parameter can't be used directly in Test script, goto Correspoding Action an right click

and go to Action properties  and define  Action parameter to use.(for ex: path1)

then goto Action Call Properties-> and set value for defined action parameter

as Test parameter(in value column for that parameter  click  on the '<>' to set value and set Test parameter as parameter type and set "path" variable to Action parameter(path1)

and use same action parameter in the  datatable.import sheet statement

datatable.importsheet path1

When we run the Test   we can give the path of Excel sheet in "Run  dialog box->Paramters" .

Using of Environment variable

define an environment varibale in Test->settings->Environment parameters

Select parameter type as "Userdefined" from list box and define the  parameter

and use directly in datatable.importsheet statement. Here we need to give value of path  before executing the script.

let me know if u have any qts


 
Is this answer useful? Yes | No
July 06, 2007 01:07:44   #2  
Deepa        

RE: I m setting the excel sheet path in QTP for import...
I didn't get what you are trying to explain. Can you Plz explain it with an Example. My Prob is that I want to import data from an excel sheet into a database. ie to implement the insertion Process.
 
Is this answer useful? Yes | No

 Related Questions

Hi I am new to load testing .Currently i am using Load runner 8.2. i have recorded a script for login screen with some UID/PWD.In load runner Controller i have selected 100 Vusers,and i the run script.My question is :1.)Is the same script runs 100 times for same UID/PWD what i have entered during Recording.2.)If my data base contains only 50 users.Selecting 100 Vusers is a valid case?.3.)If i have selected 100 Vusers,is it necessary to enter 100 UID/PWD.Regards,vivek
Read Answers (8) | Asked by : vivek

In Quick Test Pro 8.21. While Recording/writing the Script i want to know the " Selecting Tab Position Action Script".Eg: Window contains 4 tab positions i would like to select 2 tab position at that time how script will come. plz write the script and send me. 2. How can i generate and select Tree View in Programatically. Eg: Mycomputer Contains all drives information like as below. +My Computerwhen i press + Symbol My Computer will Expand that format like-- My Computer Drive

How to use automation object to load the library files in QTP. I tried to use this stmt" set App = createobject("Quicktest.Application")App.Test.Settings.Resources.Libraries.Add ("F:QTPrepository.vbs"),1 ".could u pls help how to add it by script itself? what is executefile concept? is it workaround to my question?

Latest Answer : In QTP 9.2, there is an option to export to XML filefrom Object repository manager, File-> Export to XML option is there.Is this what you wanted or something elseRegards,Meena ...
Read Answers (3) | Asked by : Nagelli Anil Kumar

I am testing a web application using QTP, it is not recognizing date picker, which is coded in Java Script. any solution?
Read Answers (3) | Asked by : Sooraj

Is there any way that v can start recording our script with the same page, without creating a new instance for that page. for e.g. continuing our script recording with 'flight confirm mercury' page only, even if 'flight confirm mercury' exists in the OR?
Read Answers (1) | Asked by : Rverma

I am testing an application that sends certain data to users. How do i check that the user will not receive excess data. I mean I can go in and sign in as the user and insert a standard checkpoint...but that only checks the data integrity, it does not check if the user received excess data. Please help..any suggestions are welcomed
Read Answers (2) | Asked by : Raj

Hi i am new to VB Scripting, I have a problem to declare an array in QTP. I am using a variable to declare an array which is come in runtime.Example:Dim variable1 - declare the variable using dimvariable1 = "senthil" - assign the value which is come in run timeDim variable1 (10) - declare the dynamic array using dimvariable1 (1) = "kumar" - store the value in arrayvariable1 (2) = "chandru" - store the value in array This is the way i tried, but

Hi Fellowmates...i am pretty new entrant into this. I am on QTP and into the beginning of it. I really need lot of support and help from your end. When do we go with Object Repository and also the error handling. When i was running the script i got 2 messages for 2 runs saying that :-Cannot find the 'keyword' objects parent "mainContent"(class frame) Verify that parent properties match an object currently displayed in your application.Cannot identify the object "main_content_3'
Read Answers (4) | Asked by : CHAKRATENG

I am testing a Java executable application and and IE based application.I have a script that I would like to launch the Java executable, enter a record in the database, the switch over to IE and search the database. Currently I am having trouble: 1) The java EXE cannot be launched from the QTP command line. So my run settings are run on any open Java application. This is not preferable and right now DEV cannot figure out why QTP can launch other Java apps and not ours. So when I start the script


 Sponsored Links

 
Related Articles

Breaking up XML into Relational Data

Breaking up XML into Relational Data While the preceding example shows how to construct an XML representation over relational data the example in this section illustrates how you can shred XML data back into relational data This reverse operation can be useful if your application works with relation
 

Querying Data with Oracle XQuery

Querying Data with Oracle XQuery Starting with Oracle Database 10g Release 2 you can take advantage of a full featured native XQuery engine integrated with the database With Oracle XQuery you can accomplish various tasks involved in developing PHP Oracle XML applications operating on any kind of dat
 

Retrieving XML Data

Retrieving XML DataTo retrieve XML data from an XMLType table you can use a SELECT SQL statement just as you would if you had to query a relational table For example to select the employee with the id set to 100 from the employees XMLType table discussed in the preceding section you might issue the
 

Using XMLType for Handling XML Data in the Database

Using XMLType for Handling XML Data in the Database Being an object type XMLType can not only be used to store XML data in the database but also to operate on that data via its built in methods Regardless of the storage model you choose XMLType provides a set of XML specific methods to operate on XM
 

Using Oracle Database for Storing, Modifying, and Retrieving XML Data

Using Oracle Database for Storing Modifying and Retrieving XML Data With Oracle XML DB you have various XML storage and XML processing options allowing you to achieve the required level of performance and scalability One of the most interesting things about Oracle XML DB is that it allows you to per
 

ODP.NET - Techniques to Improve Performance while Retrieving Data

ODP NET Techniques to Improve Performance while Retrieving Data Performance tuning is a great subject in Oracle Volumes of books would not be enough to cover every aspect of performance tuning in Oracle However in this section we will only discuss the fundamental performance techniques while working
 

ODP.NET - Populating a Dataset with a Single Data Table

ODP NET Populating a Dataset with a Single Data Table A dataset is simply a group of data tables These data tables can be identified with their own unique names within a dataset You can also add relations between data tables available in a dataset mosgoogle The following code gives you the details o
 

ODP.NET - Filling a DataTable Using OracleDataReader

ODP NET Filling a DataTable Using OracleDataReader So far we have been filling data tables using OracleDataAdapter ADO NET 2 0 gives us the flexibility to fill a data table using OracleDataReader as well The following code gives you the details of all employees available in the emp table by filling
 

ODP.NET - Retrieving Typed Data

ODP NET Retrieving Typed Data While retrieving values from OracleDataReader we can extract information available in individual columns of a particular row either by using column ordinal position values or column names mosgoogle Retrieving Typed Data Using Ordinals ODP NET provides data specific enum
 

ODP.NET - Retrieving Data Using OracleDataReader

ODP NET Retrieving Data Using OracleDataReader OracleDataReader is simply a read only and forward only result set It works only if the database connection is open and it makes sure that the connection is open while you are retrieving data As the data that it retrieves is read only it is a bit faster
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape