Request Manipulation

block

Blocks individual requests from loading (useful for blocking content like ads). The command matches the list of things to block against the full url of each request (including host name).
Browser Support: IE, Chrome, Firefox

usage:   block <block strings>  
example: block adswrapper.js addthis.com

<block strings> - space-delimited list of substrings to block

blockDomains

Blocks all requests from the given domains from loading (useful for blocking content like ads). Takes a space-delimited list of full domains to block.
Browser Support: Desktop (wptdriver 300+)

usage:   blockDomains <block domains>  
example: blockDomains adswrapper.js addthis.com

<block domains> - space-delimited list of domains to block

blockDomainsExcept

Blocks all requests not from one of the given domains from loading (useful for blocking content like ads). Takes a space-delimited list of full domains to allow.
Browser Support: Desktop (wptdriver 300+)

usage:   blockDomainsExcept <allow domains>  
example: blockDomainsExcept [www.example.com](http://www.example.com) cdn.example.com
                                              
<allow domains> - space-delimited list of domains to allow

setCookie

Stores a browser cookie to be used while navigating.
Browser Support: IE, Chrome, Firefox

usage:   setCookie <path> <value>  
example: setCookie <http://www.aol.com> zip=20166  
example: setCookie <http://www.aol.com> TestData = Test; expires = Sat,01-Jan-2000 00:00:00 GMT
<path> - Path where the cookie should be used/stored  

<value> - Cookie value (if expiration information isn't included it will be stored as a session cookie)  

setDns

Allows for overriding the IP address to be used for a host name. The override is effectively the same as populating an entry in the hosts file and will eliminate the DNS lookup times.Browser Support: IE, Chrome, Firefox, Safari

usage:   setDns <host name> <IP Address>  
example: setDns [www.aol.com](http://www.aol.com) 127.0.0.1
                                                     
<host name> - Host name for the DNS entry to override  
<IP Address> - IP Address for the host name to resolve to  

setDNSName

Allows for overriding a host name (creating a fake CNAME).
Browser Support: IE, Chrome, Firefox, Safari

usage:   setDnsName <name to override> <real name>  
example: setDnsName pat.aol.com [www.aol.com](http://www.aol.com)
                                              
<name to override> - Host name to replace  
<real name> - Real name to lookup instead

setUserAgent

Overrides the User Agent string sent by the browser
Browser Support: IE, Chrome, Firefox, Safari

CAUTION : You will still be using the same browser engine so you are still limited by the capabilities and behavior of that browser even if you are spoofing another browser

usage:   setUserAgent <user agent string>  
example: setUserAgent Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543 Safari/419.3
<user agent string> - User agent string to use.

overrideHost

Replaces the value of the Host: HTTP header for the given host with the provided replacement. It also adds a new header (X-Host:) with the original value.
Browser Support: IE, Chrome, Firefox, Safari (no SSL)

usage:   overrideHost <host> <new host>  
example: overrideHost [www.aol.com](http://www.aol.com) [www.notaol.com](http://www.notaol.com)

<host> - host for which you want to override the Host: HTTP header  
<new host> - value to set for the Host header

addHeader

Adds the specified header to every http request (in addition to the headers that exist, does not overwrite an existing header).
Browser Support: IE, Chrome, Firefox, Safari (no SSL)

usage:   addHeader <header>  
example: addHeader Pragma: akamai-x-cache-on

<header> - Full header entry to add (including label)

setHeader

Adds the specified header to every http request, overriding the header if it already exists.
Browser Support: IE, Chrome, Firefox, Safari (no SSL)

usage:   setHeader <header>  
example: setHeader UA-CPU: none-ya

<header> - Full header entry to set (including label)

resetHeaders

Clears any headers that were specified through addHeaders or setHeaders (in case you want to only override headers for part of a script).
Browser Support: IE, Chrome, Firefox, Safari

usage:   resetHeaders  
example: resetHeaders