Skip to content

Commit 42267e3

Browse files
authored
Remove if and add clearCache
1 parent 5398773 commit 42267e3

1 file changed

Lines changed: 8 additions & 25 deletions

File tree

src/scripting.md

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -593,31 +593,6 @@ navigate www.yahoo.com
593593
navigate www.aol.com
594594
```
595595

596-
#### `if`/`else`/`endif`
597-
Conditionally execute a block of script code based on run number or cached state for the test. Conditional blocks can be nested.
598-
Browser Support: IE, Chrome, Firefox, Safari
599-
```markup
600-
usage:
601-
if [cached|run] <value>
602-
<commands>
603-
else
604-
<commands>
605-
endif
606-
607-
example:
608-
if run 1
609-
if cached 0
610-
<do something for first view of first run>
611-
endif
612-
else
613-
<do something else for everything but first run>
614-
endif
615-
616-
[cached|run] - Compare against run number or cached state
617-
<value> - matching run number or cached state to execute block
618-
<commands> - commands to run
619-
```
620-
621596
#### `expireCache`
622597
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.
623598
Browser Support: IE
@@ -628,6 +603,14 @@ example: expireCache 86400
628603
<seconds> - Any resources with a cache lifetime less than this amount of time will be forced to expire.
629604
```
630605

606+
#### `clearCache`
607+
Clears all cache and cookies.
608+
609+
```markup
610+
usage: clearCache <seconds>
611+
example: clearCache
612+
```
613+
631614
#### `firefoxPref`
632615
Allows you to specify arbitrary preferences that will be configured before launching the browser.
633616
Browser Support: Firefox

0 commit comments

Comments
 (0)