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
A promise that will be fulfilled with no arguments.
Example
(async ()=>{
await TC.addNetworkFilter("http://www.myco.com/*", true, "All");
})();

