MyBB Internal: One or more warnings occured. Please contact your administrator for assistance.
WebPagetest Forums - Sending script down to runtest.php

WebPagetest Forums

Full Version: Sending script down to runtest.php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I've been using webpagetest for a long time, scripting Jmeter and Jenkins to get CI perf graphs and it's great. But now I need to send a webpagetest script down to runtest.php

I'm posting the name value pair 'script' but I can only get it to work for a one line script.

I want to navigate to a page, enter some log in info and press the log in button. The script works manually but in the POST, the first navigate key word wants to take the whole script as it's input. I've tried \n and \r to specify new lines but am not getting anywhere.

How would I get this to work for example:

name=script value=navigate <my first url>\nsetValue name=signIn_emailAddress <my email>\nsetValue name=signIn_password <password>\nclickAndWait name=signIn_signInButton

this works ok:
name=script value=navigate <my first url>

and if I add the \n on the end of that, it just shows up in the browser on the end of the url...

I believe the POSTs are usually expecting to be mime encoded but I've never looked to be honest - you can watch what your browser posts to see what is going on. You can send it through get as a query param as well, just make sure to urlencode it (that is the most common cause for API calls failing).
I have tried GET as well and here's a simpler example. Any ideas on getting this working?

sent this down:
GET /runtest.php?url= HTTP/1.1

with these headers:
MIME-version: 1.0 (generated by my-application 1.2)
Content-Type: multipart/mixed

but got back:
<?xml version="1.0" encoding="UTF-8"?>
<statusText>Please enter a Valid URL. <b>\nnavigate</b> is not a valid URL</statusText>

Again, if I simplify this to:
GET /runtest.php?url=

that last \n is appended to the url

Any ideas on getting the '\n' used to split up the script?

This page ( doesn't give any details and line 958 on this page ( suggests that the script should be split on "\n".

Thanks for any help on this,
Your GET request is not properly URL Encoded. Here is a site I usually use to try things out:

Here is what it should look like:
Thanks. I had used a similar encoding site but had typed \n into notepad myself. Now, when I cut and paste from notepadd++ with it's own carriage returns, it looks like your example below. This is great! Thank you so much for the support. It's working and I can now automate a proper workflow.

Kind regards,
Reference URL's