Global variables using custom scripts

Trying to create custom script which just returns a a global variable…

return window.variable

Is this supported using custom scripts?

You should be able to do this using a custom metric - https://sites.google.com/a/webpagetest.org/docs/using-webpagetest/custom-metrics

Thanks Andy, yes it worked.