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