Skip to content

Commit

Permalink
[dotnet] update references from desiredCapabilities to capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Jan 5, 2024
1 parent 5e4ce94 commit 0ebddde
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 36 deletions.
54 changes: 27 additions & 27 deletions dotnet/src/webdriver/Remote/RemoteWebDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace OpenQA.Selenium.Remote
/// [SetUp]
/// public void SetUp()
/// {
/// driver = new RemoteWebDriver(new Uri("http://127.0.0.1:4444/wd/hub"),DesiredCapabilities.InternetExplorer());
/// driver = new RemoteWebDriver(new Uri("http://127.0.0.1:4444/wd/hub"),new FirefoxOptions());
/// }
/// <para></para>
/// [Test]
Expand Down Expand Up @@ -88,9 +88,9 @@ public RemoteWebDriver(DriverOptions options)
/// <summary>
/// Initializes a new instance of the <see cref="RemoteWebDriver"/> class. This constructor defaults proxy to http://127.0.0.1:4444/wd/hub
/// </summary>
/// <param name="desiredCapabilities">An <see cref="ICapabilities"/> object containing the desired capabilities of the browser.</param>
public RemoteWebDriver(ICapabilities desiredCapabilities)
: this(new Uri(DefaultRemoteServerUrl), desiredCapabilities)
/// <param name="capabilities">An <see cref="ICapabilities"/> object containing the desired capabilities of the browser.</param>
public RemoteWebDriver(ICapabilities capabilities)
: this(new Uri(DefaultRemoteServerUrl), capabilities)
{
}

Expand All @@ -108,30 +108,30 @@ public RemoteWebDriver(Uri remoteAddress, DriverOptions options)
/// Initializes a new instance of the <see cref="RemoteWebDriver"/> class
/// </summary>
/// <param name="remoteAddress">URI containing the address of the WebDriver remote server (e.g. http://127.0.0.1:4444/wd/hub).</param>
/// <param name="desiredCapabilities">An <see cref="ICapabilities"/> object containing the desired capabilities of the browser.</param>
public RemoteWebDriver(Uri remoteAddress, ICapabilities desiredCapabilities)
: this(remoteAddress, desiredCapabilities, RemoteWebDriver.DefaultCommandTimeout)
/// <param name="capabilities">An <see cref="ICapabilities"/> object containing the desired capabilities of the browser.</param>
public RemoteWebDriver(Uri remoteAddress, ICapabilities capabilities)
: this(remoteAddress, capabilities, RemoteWebDriver.DefaultCommandTimeout)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="RemoteWebDriver"/> class using the specified remote address, desired capabilities, and command timeout.
/// </summary>
/// <param name="remoteAddress">URI containing the address of the WebDriver remote server (e.g. http://127.0.0.1:4444/wd/hub).</param>
/// <param name="desiredCapabilities">An <see cref="ICapabilities"/> object containing the desired capabilities of the browser.</param>
/// <param name="capabilities">An <see cref="ICapabilities"/> object containing the desired capabilities of the browser.</param>
/// <param name="commandTimeout">The maximum amount of time to wait for each command.</param>
public RemoteWebDriver(Uri remoteAddress, ICapabilities desiredCapabilities, TimeSpan commandTimeout)
: this(new HttpCommandExecutor(remoteAddress, commandTimeout), desiredCapabilities)
public RemoteWebDriver(Uri remoteAddress, ICapabilities capabilities, TimeSpan commandTimeout)
: this(new HttpCommandExecutor(remoteAddress, commandTimeout), capabilities)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="RemoteWebDriver"/> class
/// </summary>
/// <param name="commandExecutor">An <see cref="ICommandExecutor"/> object which executes commands for the driver.</param>
/// <param name="desiredCapabilities">An <see cref="ICapabilities"/> object containing the desired capabilities of the browser.</param>
public RemoteWebDriver(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
: base(commandExecutor, desiredCapabilities)
/// <param name="capabilities">An <see cref="ICapabilities"/> object containing the desired capabilities of the browser.</param>
public RemoteWebDriver(ICommandExecutor commandExecutor, ICapabilities capabilities)
: base(commandExecutor, capabilities)
{
}

Expand All @@ -150,7 +150,7 @@ public bool HasActiveDevToolsSession
/// <returns>IWebElement object so that you can interact with that object</returns>
/// <example>
/// <code>
/// IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox());
/// IWebDriver driver = new RemoteWebDriver(new FirefoxOptions());
/// IWebElement elem = driver.FindElementById("id")
/// </code>
/// </example>
Expand All @@ -166,7 +166,7 @@ public IWebElement FindElementById(string id)
/// <returns>ReadOnlyCollection of Elements that match the object so that you can interact that object</returns>
/// <example>
/// <code>
/// IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox());
/// IWebDriver driver = new RemoteWebDriver(new FirefoxOptions());
/// ReadOnlyCollection<![CDATA[<IWebElement>]]> elem = driver.FindElementsById("id")
/// </code>
/// </example>
Expand All @@ -192,7 +192,7 @@ public ReadOnlyCollection<IWebElement> FindElementsById(string id)
/// <returns>IWebElement object so that you can interact that object</returns>
/// <example>
/// <code>
/// IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox());
/// IWebDriver driver = new RemoteWebDriver(new FirefoxOptions());
/// IWebElement elem = driver.FindElementByClassName("classname")
/// </code>
/// </example>
Expand All @@ -218,7 +218,7 @@ public IWebElement FindElementByClassName(string className)
/// <returns>ReadOnlyCollection of IWebElement object so that you can interact with those objects</returns>
/// <example>
/// <code>
/// IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox());
/// IWebDriver driver = new RemoteWebDriver(new FirefoxOptions());
/// ReadOnlyCollection<![CDATA[<IWebElement>]]> elem = driver.FindElementsByClassName("classname")
/// </code>
/// </example>
Expand All @@ -244,7 +244,7 @@ public ReadOnlyCollection<IWebElement> FindElementsByClassName(string className)
/// <returns>IWebElement object so that you can interact that object</returns>
/// <example>
/// <code>
/// IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox());
/// IWebDriver driver = new RemoteWebDriver(new FirefoxOptions());
/// IWebElement elem = driver.FindElementsByLinkText("linktext")
/// </code>
/// </example>
Expand All @@ -260,7 +260,7 @@ public IWebElement FindElementByLinkText(string linkText)
/// <returns>ReadOnlyCollection<![CDATA[<IWebElement>]]> object so that you can interact with those objects</returns>
/// <example>
/// <code>
/// IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox());
/// IWebDriver driver = new RemoteWebDriver(new FirefoxOptions());
/// ReadOnlyCollection<![CDATA[<IWebElement>]]> elem = driver.FindElementsByClassName("classname")
/// </code>
/// </example>
Expand All @@ -276,7 +276,7 @@ public ReadOnlyCollection<IWebElement> FindElementsByLinkText(string linkText)
/// <returns>IWebElement object so that you can interact that object</returns>
/// <example>
/// <code>
/// IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox());
/// IWebDriver driver = new RemoteWebDriver(new FirefoxOptions());
/// IWebElement elem = driver.FindElementsByPartialLinkText("partOfLink")
/// </code>
/// </example>
Expand All @@ -292,7 +292,7 @@ public IWebElement FindElementByPartialLinkText(string partialLinkText)
/// <returns>ReadOnlyCollection<![CDATA[<IWebElement>]]> objects so that you can interact that object</returns>
/// <example>
/// <code>
/// IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox());
/// IWebDriver driver = new RemoteWebDriver(new FirefoxOptions());
/// ReadOnlyCollection<![CDATA[<IWebElement>]]> elem = driver.FindElementsByPartialLinkText("partOfTheLink")
/// </code>
/// </example>
Expand All @@ -308,7 +308,7 @@ public ReadOnlyCollection<IWebElement> FindElementsByPartialLinkText(string part
/// <returns>IWebElement object so that you can interact that object</returns>
/// <example>
/// <code>
/// IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox());
/// IWebDriver driver = new RemoteWebDriver(new FirefoxOptions());
/// elem = driver.FindElementsByName("name")
/// </code>
/// </example>
Expand All @@ -324,7 +324,7 @@ public IWebElement FindElementByName(string name)
/// <returns>ReadOnlyCollect of IWebElement objects so that you can interact that object</returns>
/// <example>
/// <code>
/// IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox());
/// IWebDriver driver = new RemoteWebDriver(new FirefoxOptions());
/// ReadOnlyCollection<![CDATA[<IWebElement>]]> elem = driver.FindElementsByName("name")
/// </code>
/// </example>
Expand All @@ -340,7 +340,7 @@ public ReadOnlyCollection<IWebElement> FindElementsByName(string name)
/// <returns>IWebElement object so that you can interact that object</returns>
/// <example>
/// <code>
/// IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox());
/// IWebDriver driver = new RemoteWebDriver(new FirefoxOptions());
/// IWebElement elem = driver.FindElementsByTagName("tag")
/// </code>
/// </example>
Expand All @@ -356,7 +356,7 @@ public IWebElement FindElementByTagName(string tagName)
/// <returns>IWebElement object so that you can interact that object</returns>
/// <example>
/// <code>
/// IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox());
/// IWebDriver driver = new RemoteWebDriver(new FirefoxOptions());
/// ReadOnlyCollection<![CDATA[<IWebElement>]]> elem = driver.FindElementsByTagName("tag")
/// </code>
/// </example>
Expand All @@ -372,7 +372,7 @@ public ReadOnlyCollection<IWebElement> FindElementsByTagName(string tagName)
/// <returns>IWebElement object so that you can interact that object</returns>
/// <example>
/// <code>
/// IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox());
/// IWebDriver driver = new RemoteWebDriver(new FirefoxOptions());
/// IWebElement elem = driver.FindElementsByXPath("//table/tbody/tr/td/a");
/// </code>
/// </example>
Expand All @@ -388,7 +388,7 @@ public IWebElement FindElementByXPath(string xpath)
/// <returns>ReadOnlyCollection of IWebElement objects so that you can interact that object</returns>
/// <example>
/// <code>
/// IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox());
/// IWebDriver driver = new RemoteWebDriver(new FirefoxOptions());
/// ReadOnlyCollection<![CDATA[<IWebElement>]]> elem = driver.FindElementsByXpath("//tr/td/a")
/// </code>
/// </example>
Expand Down
2 changes: 1 addition & 1 deletion dotnet/src/webdriver/VirtualAuth/Credential.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// <copyright file="DesiredCapabilities.cs" company="WebDriver Committers">
// <copyright file="Credentials.cs" company="WebDriver Committers">
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// <copyright file="DesiredCapabilities.cs" company="WebDriver Committers">
// <copyright file="IHasVirtualAuthenticator.cs" company="WebDriver Committers">
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// <copyright file="DesiredCapabilities.cs" company="WebDriver Committers">
// <copyright file="VirtualAuthenticatorOptions.cs" company="WebDriver Committers">
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
Expand Down Expand Up @@ -115,7 +115,7 @@ public VirtualAuthenticatorOptions SetTransport(string transport)
}

/// <summary>
/// If set to true the authenticator will support client-side discoverable credentials.
/// If set to true the authenticator will support client-side discoverable credentials.
/// Refer https://w3c.github.io/webauthn/#client-side-discoverable-credential
/// </summary>
/// <param name="hasResidentKey">boolean value to set</param>
Expand All @@ -139,7 +139,7 @@ public VirtualAuthenticatorOptions SetHasUserVerification(bool hasUserVerificati
}

/// <summary>
/// If set to true, a user consent will always be granted.
/// If set to true, a user consent will always be granted.
/// Refer https://w3c.github.io/webauthn/#user-consent
/// </summary>
/// <param name="isUserConsenting">boolean value to set</param>
Expand Down
8 changes: 4 additions & 4 deletions dotnet/src/webdriver/WebDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -594,8 +594,8 @@ protected virtual Response Execute(string driverCommandToExecute, Dictionary<str
/// <summary>
/// Starts a session with the driver
/// </summary>
/// <param name="desiredCapabilities">Capabilities of the browser</param>
protected void StartSession(ICapabilities desiredCapabilities)
/// <param name="capabilities">Capabilities of the browser</param>
protected void StartSession(ICapabilities capabilities)
{
Dictionary<string, object> parameters = new Dictionary<string, object>();

Expand All @@ -604,10 +604,10 @@ protected void StartSession(ICapabilities desiredCapabilities)
// and end nodes are compliant with the W3C WebDriver Specification,
// and therefore will already contain all of the appropriate values
// for establishing a session.
RemoteSessionSettings remoteSettings = desiredCapabilities as RemoteSessionSettings;
RemoteSessionSettings remoteSettings = capabilities as RemoteSessionSettings;
if (remoteSettings == null)
{
Dictionary<string, object> matchCapabilities = this.GetCapabilitiesDictionary(desiredCapabilities);
Dictionary<string, object> matchCapabilities = this.GetCapabilitiesDictionary(capabilities);

List<object> firstMatchCapabilitiesList = new List<object>();
firstMatchCapabilitiesList.Add(matchCapabilities);
Expand Down

0 comments on commit 0ebddde

Please sign in to comment.