diff --git a/dotnet/src/support/GlobalSuppressions.cs b/dotnet/src/support/GlobalSuppressions.cs index 3ddc3b0fe059b..e46ac86aba200 100644 --- a/dotnet/src/support/GlobalSuppressions.cs +++ b/dotnet/src/support/GlobalSuppressions.cs @@ -30,6 +30,7 @@ [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", MessageId = "1#", Scope = "member", Target = "OpenQA.Selenium.Support.Events.WebDriverNavigationEventArgs.#.ctor(OpenQA.Selenium.IWebDriver,System.String)", Justification = "Using string to preserve user input.")] [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings", Scope = "member", Target = "OpenQA.Selenium.Support.Events.WebDriverNavigationEventArgs.#Url", Justification = "Using string to preserve user input.")] [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "OpenQA.Selenium.Support.Events.EventFiringWebDriver+EventFiringWebElement.#ParentDriver", Justification = "Method must be available for subclasses.")] +[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes", Scope = "namespace", Target = "OpenQA.Selenium.Support.Extensions", Justification = "This namespace will likely grow over time.")] [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Scope = "member", Target = "OpenQA.Selenium.Support.Events.EventFiringWebDriver.#Close()", Justification = "Firing event on all execptions, so catching generic Exception is appropriate.")] [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Scope = "member", Target = "OpenQA.Selenium.Support.Events.EventFiringWebDriver.#CurrentWindowHandle", Justification = "Firing event on all execptions, so catching generic Exception is appropriate.")] [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Scope = "member", Target = "OpenQA.Selenium.Support.Events.EventFiringWebDriver.#ExecuteAsyncScript(System.String,System.Object[])", Justification = "Firing event on all execptions, so catching generic Exception is appropriate.")] diff --git a/dotnet/src/support/PageObjects/WebElementListProxy.cs b/dotnet/src/support/PageObjects/WebElementListProxy.cs index 95571945f967a..5c9f00b4e93fb 100644 --- a/dotnet/src/support/PageObjects/WebElementListProxy.cs +++ b/dotnet/src/support/PageObjects/WebElementListProxy.cs @@ -34,13 +34,6 @@ internal class WebElementListProxy : IList private readonly bool cache; private List collection = null; - /// - /// Prevents a default instance of the class. - /// - private WebElementListProxy() - { - } - /// /// Initializes a new instance of the class. /// @@ -54,6 +47,13 @@ internal WebElementListProxy(ISearchContext searchContext, IEnumerable bys, this.cache = cache; } + /// + /// Prevents a default instance of the class from being created. + /// + private WebElementListProxy() + { + } + /// /// Gets the number of elements contained in the instance. /// @@ -70,24 +70,6 @@ public bool IsReadOnly get { return true; } } - /// - /// Gets or sets the element at the specified index. - /// - /// The zero-based index of the element to get or set. - /// The at the specified index. - public IWebElement this[int index] - { - get - { - return this.ElementList[index]; - } - - set - { - throw new NotImplementedException(); - } - } - private List ElementList { get @@ -106,6 +88,24 @@ private List ElementList } } + /// + /// Gets or sets the element at the specified index. + /// + /// The zero-based index of the element to get or set. + /// The at the specified index. + public IWebElement this[int index] + { + get + { + return this.ElementList[index]; + } + + set + { + throw new NotImplementedException(); + } + } + /// /// Determines whether an element is in the . /// diff --git a/dotnet/src/support/PageObjects/WebElementProxy.cs b/dotnet/src/support/PageObjects/WebElementProxy.cs index 1fe8ce1b7bd47..f97503b269bf2 100644 --- a/dotnet/src/support/PageObjects/WebElementProxy.cs +++ b/dotnet/src/support/PageObjects/WebElementProxy.cs @@ -36,13 +36,6 @@ internal class WebElementProxy : IWebElement, ILocatable, IWrapsElement private readonly bool cache; private IWebElement cachedElement; - /// - /// Prevents a default instance of the class. - /// - private WebElementProxy() - { - } - /// /// Initializes a new instance of the class. /// @@ -56,6 +49,13 @@ internal WebElementProxy(ISearchContext searchContext, IEnumerable bys, bool this.cache = cache; } + /// + /// Prevents a default instance of the class from being created. + /// + private WebElementProxy() + { + } + /// /// Gets the tag name of this element. /// @@ -141,7 +141,7 @@ public ICoordinates Coordinates } /// - /// Defines the interface through which the user can discover if there is an underlying element to be used. + /// Gets the interface through which the user can discover if there is an underlying element to be used. /// public IWebElement WrappedElement { @@ -181,6 +181,7 @@ public void Clear() /// /// Simulates typing text into the element. /// + /// The keys to send to the element. public void SendKeys(string text) { this.WrappedElement.SendKeys(text); @@ -205,6 +206,8 @@ public void Click() /// /// Gets the value of the specified attribute for this element. /// + /// The attribute name to retrieve the value of. + /// The value of the attribute. Returns if the attribute does not exist. public string GetAttribute(string attributeName) { return this.WrappedElement.GetAttribute(attributeName); @@ -213,6 +216,8 @@ public string GetAttribute(string attributeName) /// /// Gets the value of a CSS property of this element. /// + /// The property name to retrieve the value of. + /// The value of the CSS property. public string GetCssValue(string propertyName) { return this.WrappedElement.GetCssValue(propertyName);