"Fossies" - the Fresh Open Source Software Archive 
Member "selenium-selenium-4.8.1/dotnet/src/webdriver/OptionsManager.cs" (17 Feb 2023, 2749 Bytes) of package /linux/www/selenium-selenium-4.8.1.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C# source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "OptionsManager.cs" see the
Fossies "Dox" file reference documentation.
1 // <copyright file="OptionsManager.cs" company="WebDriver Committers">
2 // Licensed to the Software Freedom Conservancy (SFC) under one
3 // or more contributor license agreements. See the NOTICE file
4 // distributed with this work for additional information
5 // regarding copyright ownership. The SFC licenses this file
6 // to you under the Apache License, Version 2.0 (the "License");
7 // you may not use this file except in compliance with the License.
8 // You may obtain a copy of the License at
9 //
10 // http://www.apache.org/licenses/LICENSE-2.0
11 //
12 // Unless required by applicable law or agreed to in writing, software
13 // distributed under the License is distributed on an "AS IS" BASIS,
14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 // See the License for the specific language governing permissions and
16 // limitations under the License.
17 // </copyright>
18
19 namespace OpenQA.Selenium
20 {
21 /// <summary>
22 /// Provides a mechanism for setting options needed for the driver during the test.
23 /// </summary>
24 internal class OptionsManager : IOptions
25 {
26 private WebDriver driver;
27
28 /// <summary>
29 /// Initializes a new instance of the <see cref="OptionsManager"/> class
30 /// </summary>
31 /// <param name="driver">Instance of the driver currently in use</param>
32 public OptionsManager(WebDriver driver)
33 {
34 this.driver = driver;
35 }
36
37 /// <summary>
38 /// Gets an object allowing the user to manipulate cookies on the page.
39 /// </summary>
40 public ICookieJar Cookies
41 {
42 get { return new CookieJar(this.driver); }
43 }
44
45 /// <summary>
46 /// Gets an object allowing the user to manipulate the currently-focused browser window.
47 /// </summary>
48 /// <remarks>"Currently-focused" is defined as the browser window having the window handle
49 /// returned when IWebDriver.CurrentWindowHandle is called.</remarks>
50 public IWindow Window
51 {
52 get { return new Window(this.driver); }
53 }
54
55 /// <summary>
56 /// Gets an object allowing the user to examine the logs of the current driver instance.
57 /// </summary>
58 public ILogs Logs
59 {
60 get { return new Logs(this.driver); }
61 }
62
63 /// <summary>
64 /// Provides access to the timeouts defined for this driver.
65 /// </summary>
66 /// <returns>An object implementing the <see cref="ITimeouts"/> interface.</returns>
67 public ITimeouts Timeouts()
68 {
69 return new Timeouts(this.driver);
70 }
71
72 public INetwork Network
73 {
74 get { return this.driver.Network; }
75 }
76 }
77 }