WebPagetest Forums

Full Version: Scripting: if/else/endif not working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys,
I'm trying to script with if/else/endif but it doesn't seem to work.
This is the script that I used:

if cached 0
navigate google.com
else
navigate yahoo.com
endif

When I try to run the script above, it never goes to google.com and will always evaluate the else condition.
https://www.webpagetest.org/result/170619_RF_1WKG/

I also tried to follow the documentation and tried to follow the format with the example script given for if/else/endif

https://sites.google.com/a/webpagetest.o...else-endif

if run 1
if cached 0
navigate google.com
endif
else
navigate yahoo.com
endif

But I get the same issue. Everytime I run the script above, It evaluates the else condition.

https://www.webpagetest.org/result/170619_8S_1WS6/

Am I doing something wrong or is this a bug with if/else/endif?
It's been around 3 months since i've posted this but can anyone confirm if this is a known bug or if they are having similar issues?
Reference URL's