Skip to content

Commit e7f75b9

Browse files
authored
Remove unsupported commands and examples
1 parent d8fa211 commit e7f75b9

1 file changed

Lines changed: 0 additions & 102 deletions

File tree

src/scripting.md

Lines changed: 0 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -309,21 +309,6 @@ example: keypress Enter
309309

310310
For the difference between `keypress` and `keypressAndWait`, see [`click`](#click) and [`clickAndWait`](#clickandwait).
311311

312-
#### `sendKeyDown` / `sendKeyUp` / `sendKeyPress` (`sendKeyDownAndWait` / `sendKeyUpAndWait` / `sendKeyPressAndWait`)
313-
Creates a JavaScript keyboard event (`onkeydown`, `onkeyup`, `onkeypress`) and sends it to the indicated element.
314-
Browser Support: IE
315-
```markup
316-
usage: sendKeyDownAndWait <wpt-selector> <key>
317-
example: sendKeyDownAndWait name=user x
318-
319-
<wpt-selector> - DOM element to send the click event to
320-
<key> - Key command to send (special values are ENTER, DEL, DELETE, BACKSPACE, TAB, ESCAPE, PAGEUP, PAGEDOWN)
321-
```
322-
323-
For the list of supported selectors, see [Selectors](#selectors).
324-
325-
For the difference between `command` and `commandAndWait` versions, see [`click`](#click) and [`clickAndWait`](#clickandwait).
326-
327312
#### `setInnerHTML`
328313
Sets the innerHTML of the given DOM element to the provided value. This is usually used for filling in something like an editable HTML panel (like the message body in webmail). Use this if you want to include HTML formatting.
329314
Browser Support: IE, Chrome, Firefox
@@ -535,18 +520,6 @@ example: overrideHost www.aol.com www.notaol.com
535520
<new host> - value to set for the Host header
536521
```
537522

538-
#### `overrideHostUrl`
539-
For all requests to the given host, rewrite the requests to go to a different server and include the original host in the new URI.
540-
Browser Support: IE
541-
```markup
542-
usage: overrideHostUrl <host> <new host>
543-
example: overrideHostUrl www.webpagetest.org staging.webpagetest.org
544-
545-
<host> - host for which you want to redirect requests
546-
<new host> - target server to receive the redirected requests
547-
```
548-
In this example, http://www.webpagetest.org/index.php will get rewritten to actually request http://staging.webpagetest.org/www.webpagetest.org/index.php
549-
550523
#### `addHeader`
551524
Adds the specified header to every http request (in addition to the headers that exist, does not overwrite an existing header).
552525
Browser Support: IE, Chrome, Firefox, Safari (no SSL)
@@ -593,16 +566,6 @@ navigate www.yahoo.com
593566
navigate www.aol.com
594567
```
595568

596-
#### `expireCache`
597-
Expires any cache entries that will expire within the specified number of seconds. This can be used to simulate a repeat view after a certain amount of time (for example, what it would be like to browse the page the next day). It doesn't help with simulating content changes but any resources with a short expiration will end up being checked with if-modified-since requests.
598-
Browser Support: IE
599-
```markup
600-
usage: expireCache <seconds>
601-
example: expireCache 86400
602-
603-
<seconds> - Any resources with a cache lifetime less than this amount of time will be forced to expire.
604-
```
605-
606569
#### `clearCache`
607570
Clears all cache and cookies.
608571
Browser Support: Chrome, Safari on iOS
@@ -676,71 +639,6 @@ There is currently no way to debug failing WebPageTest scripts. If a script comm
676639
To simplify script development, consider limiting yourself to [Recommended commands](#recommended-commands) only.
677640

678641
## Sample scripts
679-
### Mail test
680-
```markup
681-
// load the account name and password
682-
// bring up the login screen
683-
setEventName launch
684-
navigate http://webmail.aol.com
685-
686-
// ignore any errors from here on (in case the mailbox is empty or we get image challenged)
687-
ignoreErrors 1
688-
689-
// log in
690-
setValue name=loginId <username>
691-
setValue name=password <password>
692-
setEventName load
693-
submitForm name=AOLLoginForm
694-
695-
// only read and send a mail once an hour
696-
minInterval AOLMail 60
697-
698-
// close the today curtain
699-
click className=backdrop
700-
sleep 5
701-
702-
// Open the first message with a subject of "test"
703-
setEventName read
704-
clickAndWait innerText=test
705-
706-
// delete the message
707-
click title=Delete (del)
708-
sleep 5
709-
710-
// open the compose mail form
711-
setEventName compose
712-
clickAndWait title=Write mail (Alt + w)
713-
714-
// send a test message to myself
715-
sleep 1
716-
setValue tabindex=100 <username>
717-
setValue name=Subject test
718-
loadFile msg.txt %MSG%
719-
setInnerText contentEditable=true Some message text
720-
sleep 1
721-
setDOMElement className=confirmMessage
722-
setEventName send
723-
clickAndWait innerText=Send
724-
725-
endInterval
726-
727-
// sign off
728-
setEventName logout
729-
clickAndWait className=signOutLink
730-
```
731-
732-
### MyAOL Authenticated profile
733-
```markup
734-
// bring up the login screen
735-
setDOMElement name=loginId
736-
navigate https://my.screenname.aol.com/_cqr/login/login.psp?mcState=initialized&sitedomain=my.aol.com&authLev=0&siteState=OrigUrl%3Dhttp%3A%2F%2Fmy.aol.com%2F
737-
738-
// log in
739-
setValue name=loginId <user name>
740-
setValue name=password <password>
741-
setDOMElement className=more_pics
742-
submitForm name=AOLLoginForm
743-
```
744642

745643
### DNS Override
746644
This script will:

0 commit comments

Comments
 (0)