You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/scripting.md
+8-25Lines changed: 8 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -593,31 +593,6 @@ navigate www.yahoo.com
593
593
navigate www.aol.com
594
594
```
595
595
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
-
621
596
#### `expireCache`
622
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.
623
598
Browser Support: IE
@@ -628,6 +603,14 @@ example: expireCache 86400
628
603
<seconds> - Any resources with a cache lifetime less than this amount of time will be forced to expire.
629
604
```
630
605
606
+
#### `clearCache`
607
+
Clears all cache and cookies.
608
+
609
+
```markup
610
+
usage: clearCache <seconds>
611
+
example: clearCache
612
+
```
613
+
631
614
#### `firefoxPref`
632
615
Allows you to specify arbitrary preferences that will be configured before launching the browser.
0 commit comments