mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add Options#setPerfLoggingPrefs
This commit is contained in:
@@ -20,6 +20,7 @@ function TestChromeOptions() {
|
||||
options = options.setChromeLogFile("logfile");
|
||||
options = options.setLocalState("state");
|
||||
options = options.setLoggingPrefs(new webdriver.logging.Preferences());
|
||||
options = options.setPerfLoggingPrefs({enableNetwork: true, enablePage: true, enableTimeline: true, tracingCategories: "category", bufferUsageReportingInterval: 1000});
|
||||
options = options.setProxy({ proxyType: "proxyType" });
|
||||
options = options.setUserPreferences("preferences");
|
||||
var capabilities: webdriver.Capabilities = options.toCapabilities();
|
||||
|
||||
+34
@@ -33,6 +33,14 @@ declare module chrome {
|
||||
prefs?: any;
|
||||
}
|
||||
|
||||
interface IPerfLoggingPrefs {
|
||||
enableNetwork: boolean;
|
||||
enablePage: boolean;
|
||||
enableTimeline: boolean;
|
||||
tracingCategories: string;
|
||||
bufferUsageReportingInterval: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Class for managing ChromeDriver specific options.
|
||||
*/
|
||||
@@ -124,6 +132,32 @@ declare module chrome {
|
||||
*/
|
||||
setLoggingPrefs(prefs: webdriver.logging.Preferences): Options;
|
||||
|
||||
/**
|
||||
* Sets the performance logging preferences. Options include:
|
||||
*
|
||||
* - `enableNetwork`: Whether or not to collect events from Network domain.
|
||||
* - `enablePage`: Whether or not to collect events from Page domain.
|
||||
* - `enableTimeline`: Whether or not to collect events from Timeline domain.
|
||||
* Note: when tracing is enabled, Timeline domain is implicitly disabled,
|
||||
* unless `enableTimeline` is explicitly set to true.
|
||||
* - `tracingCategories`: A comma-separated string of Chrome tracing categories
|
||||
* for which trace events should be collected. An unspecified or empty
|
||||
* string disables tracing.
|
||||
* - `bufferUsageReportingInterval`: The requested number of milliseconds
|
||||
* between DevTools trace buffer usage events. For example, if 1000, then
|
||||
* once per second, DevTools will report how full the trace buffer is. If a
|
||||
* report indicates the buffer usage is 100%, a warning will be issued.
|
||||
*
|
||||
* @param {{enableNetwork: boolean,
|
||||
* enablePage: boolean,
|
||||
* enableTimeline: boolean,
|
||||
* tracingCategories: string,
|
||||
* bufferUsageReportingInterval: number}} prefs The performance
|
||||
* logging preferences.
|
||||
* @return {!Options} A self reference.
|
||||
*/
|
||||
setPerfLoggingPrefs(prefs: IPerfLoggingPrefs): Options;
|
||||
|
||||
|
||||
/**
|
||||
* Sets preferences for the "Local State" file in Chrome's user data
|
||||
|
||||
Reference in New Issue
Block a user