Represents parameters required for BrowserContext instance. Using BrowserContextParams you can configure BrowserContext with different settings such as Chromium data directory, default accept language, proxy settings, etc.
More...
|
| BrowserContextParams (string dataDir) |
| Constructs a new BrowserContextParams instance with specified dataDir and default accept language obtained via BrowserPreferences.getDefaultAcceptLanguage() method. The instance will automatically set cache and memory directory relative to the dataDir location. Proxy settings will be configured to use system proxy. More...
|
|
| BrowserContextParams (string dataDir, string acceptLanguage) |
| Constructs a new BrowserContextParams instance with specified dataDir and default accept language obtained via BrowserPreferences.getDefaultAcceptLanguage() method. The instance will automatically set cache and memory directory relative to the dataDir location. Proxy settings will be configured to use system proxy. More...
|
|
|
string | DataDir [get] |
| Gets absolute path to the directory where user data files will be stored. More...
|
|
string | AcceptLanguage [get, set] |
| Gets or sets a string that represents Accept-Language request-header field. This field restricts the set of natural languages that are preferred as a response to the request. The default Accept-Language is "en-us" . See <cref>https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html</cref>W3 Documentation. More...
|
|
bool | AutoFillEnabled [get, set] |
| Gets or sets if the auto fill functionality will be enabled. More...
|
|
string | CacheDir [get, set] |
| Gets or sets absolute path to the directory where Chromium engine will store cache. Chromium and .NET processes must have rights to write to the directory. More...
|
|
ProxyConfig | ProxyConfig [get, set] |
| Gets or sets proxy configuration of the current browser instance or null if no proxy configuration was provided during Browser instance instantiation. More...
|
|
double | DefaultZoomLevel [get, set] |
| Sets the default zoom level for pages that don't override it. To zoom in use the positive zoom level. For example, 2.0, 1.5. To zoom out use the negative zoom level. For example, -1.0, -2.5. More...
|
|
StorageType | StorageType [get, set] |
| Data storage type that defines how to store all the data such as cache, cookies, HTML5 WebStorage files, etc. More...
|
|
Represents parameters required for BrowserContext instance. Using BrowserContextParams you can configure BrowserContext with different settings such as Chromium data directory, default accept language, proxy settings, etc.
DotNetBrowser.BrowserContextParams.BrowserContextParams |
( |
string |
dataDir | ) |
|
Constructs a new BrowserContextParams instance with specified dataDir and default accept language obtained via BrowserPreferences.getDefaultAcceptLanguage() method. The instance will automatically set cache and memory directory relative to the dataDir location. Proxy settings will be configured to use system proxy.
- Parameters
-
dataDir | absolute location of the directory where Chromium will store data files. Cannot be null or empty. |
- Exceptions
-
ArgumentNullException | when dataDir is null, acceptLanguage is null. |
ArgumentException | when dataDir is empty, acceptLanguage is empty. |
DotNetBrowser.BrowserContextParams.BrowserContextParams |
( |
string |
dataDir, |
|
|
string |
acceptLanguage |
|
) |
| |
Constructs a new BrowserContextParams instance with specified dataDir and default accept language obtained via BrowserPreferences.getDefaultAcceptLanguage() method. The instance will automatically set cache and memory directory relative to the dataDir location. Proxy settings will be configured to use system proxy.
- Parameters
-
dataDir | absolute location of the directory where Chromium will store data files. Cannot be null or empty. |
acceptLanguage | a string that represents default accept language (e.g. en-us). Cannot be null or empty. |
- Exceptions
-
ArgumentNullException | when dataDir is null, acceptLanguage is null. |
ArgumentException | when dataDir is empty, acceptLanguage is empty. |
ArgumentException | when acceptLanguage parameter is null or empty. |
string DotNetBrowser.BrowserContextParams.AcceptLanguage |
|
getset |
Gets or sets a string that represents Accept-Language request-header field. This field restricts the set of natural languages that are preferred as a response to the request. The default Accept-Language is "en-us"
. See <cref>https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html</cref>W3 Documentation.
"fr, en-gb;q=0.8, en;q=0.7"
would mean: "I prefer French, but
will accept British English and other types of English." Note, that all languages which are assigned a quality factor greater than 0 are acceptable.
- Exceptions
-
ArgumentException | when value set empty. |
bool DotNetBrowser.BrowserContextParams.AutoFillEnabled |
|
getset |
Gets or sets if the auto fill functionality will be enabled.
string DotNetBrowser.BrowserContextParams.CacheDir |
|
getset |
Gets or sets absolute path to the directory where Chromium engine will store cache. Chromium and .NET processes must have rights to write to the directory.
- Exceptions
-
ArgumentException | when cacheDir is null or empty. |
string DotNetBrowser.BrowserContextParams.DataDir |
|
get |
Gets absolute path to the directory where user data files will be stored.
double DotNetBrowser.BrowserContextParams.DefaultZoomLevel |
|
getset |
Sets the default zoom level for pages that don't override it. To zoom in use the positive zoom level. For example, 2.0, 1.5. To zoom out use the negative zoom level. For example, -1.0, -2.5.
ProxyConfig DotNetBrowser.BrowserContextParams.ProxyConfig |
|
getset |
Gets or sets proxy configuration of the current browser instance or null if no proxy configuration was provided during Browser instance instantiation.
StorageType DotNetBrowser.BrowserContextParams.StorageType |
|
getset |
Data storage type that defines how to store all the data such as cache, cookies, HTML5 WebStorage files, etc.