WebPagetest Forums
How to execute the webpagetest script using API - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: General Discussion (/forumdisplay.php?fid=25)
+--- Thread: How to execute the webpagetest script using API (/showthread.php?tid=14107)



How to execute the webpagetest script using API - Vijayram - 12-10-2015 07:49 PM

Hi Patric,

I am facing an issue while executing the webpagetest script(more than one script line) using API.

I have developed the WPT script for our scenario and the script like as...

navigate https://edge12345.com/
setValue name'proxyUsername xxxxx
setValue name'proxyPassword xxxx
clickAndWait name'loginSubmit

I am using HTTP Requester for posting the request to API, for single script line i am using parameter "script" with value as "google.co.in" and working fine. But in my script i have more script line as mentioned above.

How can we pass this entire script to the API. I have tired by passing ALL script lines to the "script" parameter but no luck. Please help us on how to execute WPT script having multiple commands (navigate, setValue, ClickAndWait) etc.

Thanks,
Vijay


RE: How to execute the webpagetest script using API - Vijayram - 12-15-2015 05:24 PM

Hi Pmeenan,

Did you get a chance to look into the below issue? I am unable to execute WPT script using API.

Thanks,
Vijay
(12-10-2015 07:49 PM)Vijayram Wrote:  Hi Patric,

I am facing an issue while executing the webpagetest script(more than one script line) using API.

I have developed the WPT script for our scenario and the script like as...

navigate https://edge12345.com/
setValue name'proxyUsername xxxxx
setValue name'proxyPassword xxxx
clickAndWait name'loginSubmit

I am using HTTP Requester for posting the request to API, for single script line i am using parameter "script" with value as "google.co.in" and working fine. But in my script i have more script line as mentioned above.

How can we pass this entire script to the API. I have tired by passing ALL script lines to the "script" parameter but no luck. Please help us on how to execute WPT script having multiple commands (navigate, setValue, ClickAndWait) etc.

Thanks,
Vijay



RE: How to execute the webpagetest script using API - pmeenan - 12-16-2015 02:10 AM

Handled offline (I think) but in case anyone else bumps into it. You need to make sure to urlencode the script when you send it up to the API. You can urlencode the whole thing, newlines and all.


RE: How to execute the webpagetest script using API - Vijayram - 12-18-2015 10:49 PM

(12-16-2015 02:10 AM)pmeenan Wrote:  Handled offline (I think) but in case anyone else bumps into it. You need to make sure to urlencode the script when you send it up to the API. You can urlencode the whole thing, newlines and all.

Thank you very much Patric for the help. The problem is for URL encoding is not done for new line and due to that we got error message, after providing the url encoded value to me, i have executed it and successfully got the results. Thanks for your quick support.

Regards,
Vijay