WebPagetest Forums
loadVariables - not supported? - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Private Instances (/forumdisplay.php?fid=12)
+--- Thread: loadVariables - not supported? (/showthread.php?tid=11042)

loadVariables - not supported? - sabreB6 - 04-26-2012 12:18 AM

I'm trying to submit script to my private WPT instance that loadVariables however I'm getting this error message:

loadVariables is not a supported command for uploaded scripts.

I can see same error in WPT-Monitor logs as well as in manually submitted scripts.

Do I need to change some config?


RE: loadVariables - not supported? - pmeenan - 04-26-2012 12:25 AM

Is there a reason you need to use the loadVariables command and can't just include them directly in the script? loadVariables was put in place for when the browser plugin was used for offline testing (without the web UI) and the web UI doesn't have any way to pass external files along with the tests.

It's not just a configuration thing, loadVariables (and the file attach command) just don't work unless you build some custom automation around pagetest and urlblaster directly (legacy support for older pre-WebPagetest systems).

RE: loadVariables - not supported? - sabreB6 - 04-26-2012 12:36 AM

Thanks Patrick, I thought that WPT can load file located in web-app root folder.

I would like write scripts that have some runtime params (date, origin/destination), I thought that I can generate flat file (cron) with data for the script and WPT can pick it when WPT-Monitor submit new task. The runtime params would be included in 'navigate' command.

Is there a way to do that with WPT, WPT-Monitor?

RE: loadVariables - not supported? - pmeenan - 04-26-2012 04:59 AM

I'm not sure where WPT Monitor stores the on-disk representation of a test but modifying the actual script stored in WPT Monitor may be the only way. May be worth asking in the WPT Monitor area or pinging Tony directly to see if he built something into WPT Monitor to handle it.

RE: loadVariables - not supported? - sabreB6 - 04-26-2012 04:57 PM

Ok I'll try this, thanks!

RE: loadVariables - not supported? - Remya - 04-13-2015 08:05 PM

Can you tell me how to substitute a variable using the command LoadVariable.
I tried the below code , but its throwing the error "Load variables is not a supported commands for uploaded scripts".
We stored the text file (which is having account details) in the C drive of both the IE9 node
loadVariables C:\Accounts.txt <= Here we are passing the path of the text file using LoadVariables
logData 0

// bring up the login screen
navigate http://xxxx/shop/index.jsp?categoryId=2255956
navigate https://xxx/coreg/index.jsp?step=register

// log in
setValue name=email %Username%
setValue name=password Passw0rd!
submitForm name=returningCustomer

logData 1

navigate http://xxxx/search/index.jsp?kwCatId=&kw=bat&origkw=bat&sr=1