You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactoring creation of RemoteWebElement to use a factory
Previously, the RemoteWebDriver class had a protected method called
CreateElement that took the element ID as a parameter and returned a
RemoteWebElement object. That approach is not flexible enough for some
downstream projects that implement their own subclasses of RemoteWebDriver
and RemoteWebElement. To rectify that, this commit replaces the calling of
CreateElement with the use of a RemoteWebElementFactory class that handles
the creation of RemoteWebElements. Note carefully that the CreateElement
method still exists, so as to prevent compile-time errors for downstream
consumers, that method is no longer called. If you are a user who has
overridden that method as part of your project, you'll need to create an
implementation of RemoteWebElementFactory that creates your custom
subclass of RemoteWebElement.
/// <param name="elementId">The ID of this element.</param>
1244
1232
/// <returns>A <see cref="RemoteWebElement"/> with the specified ID.</returns>
1233
+
[Obsolete("This method is no longer called to create RemoteWebElement instances. Implement a subclass of RemoteWebElementFactory and set the ElementFactory property to create instances of custom RemoteWebElement subclasses.")]
0 commit comments