Variable Substitutions
Some variables are replaced based on the URL provided for the test.
%URL%
URL provided for the test.
URL: https://wpt.example
input: navigate %URL%
output: navigate https://wpt.example
%HOST%
This will be the Host of the URL provided for the test. This does not include the protocol.
URL: https://wpt.example
input: setDnsName %HOST% dns.example
output: setDnsName wpt.example dns.example
%ORIGIN%
The Origin of the URL. This includes the protocol, the host and the port (if it is defined).
URL: https://wpt.example
input: setDnsName %HOST% dns.example
output: setDnsName wpt.example dns.example
%ORIGIN%
The Origin of the URL. This includes the protocol, the host and the port (if it is defined).
URL: https://wpt.example/hello
input: setCookie %ORIGIN% foo=bar
output: setCookie https://wpt.example foo=bar
URL: https://wpt.example:8080/hello
input: setCookie %ORIGIN% foo=bar
output: setCookie https://wpt.example:8080 foo=bar
%HOSTR%
Same as %HOST% but uses the final host name of the test URL after following any redirects.
URL: https://redirect.wpt.example
input: setDnsName %HOSTR% dns.example
output: setDnsName wpt.example dns.example
Updated about 1 month ago