TC.addNetworkFilter
Adds a filter for URL requests.
TC.addNetworkFilter(filters, include, applyTo);
- Note:
- This function is only relevant for steps that have a network-related end event, or that do not have any end event.
- You cannot use exclude and include filters at the same time.
Arguments
| Name | Description |
|---|---|
filters | (string or RegExp) Filter representing one or more URLs. Separate multiple URLs with a semicolon (;). The URL can include a wildcard (*) which can match 0 or more characters. |
| include (Optional) | (boolean) Set to true to include URL requests that match the filter; otherwise false (default value). |
| applyTo (Optional) | Specify the type of request the filter applies to. Possible values:
|
Return value
(void) undefined
Example
From the point that you add this API call, until you call the remove filter or the end of the iteration, TruClient does not wait for requests to get a response unless the URL has a http://www.myco.com/ prefix.
TC.addNetworkFilter("http://www.myco.com/*", true, "All")

