-
Notifications
You must be signed in to change notification settings - Fork 10
Version 2
Lukasz Rajchel edited this page Jun 4, 2018
·
4 revisions
The new features of V2 include:
- Selectors inheriting from
OpenQA.Selenium.By
class. V1 of the application used the trick to run the custom selectors (extension methods, object wrappers etc.) and in the end it was quite difficult to tell which part it handled by the extensions and which by Selenium core. V2 will include completely rewritten JQuery and Sizzle selectors that will inherit fromBy
class to avoid those kind of tricks. - Removal of redundant core selectors. V1 contains implementation of core Selenium selectors using custom
QuerySelector
class. The purpose of this class is to wrap the results in customWebElement
class for them to be reused while determining the context of the subsequent call. With the implementation ofBy
class, they will no longer be needed and will be removed from the library. - Removal of query selector. As described above,
QuerySelector
class will no longer be necessary and will be removed in V2. - Single NuGet package. There will be only one NuGet package containing all of the extenions instead of four separate packages that V1 included. The extensions library is small enough for all of the important code to be merged into one package.
- Support for JQuery getters and setters will be dropped. V1 included a mechanism to run JQuery getters and setters as most of the calls used
JQueryHelper
class as an mediator between Selenium core and extensions library. With the new architecture there is no place for theJQueryHelper
anymore and the support for those methods will be dropped. The only jQuery methods supported are now traversing methods. - Semantic versioning. V2 will utilize SemVer from the first release rather than V1's {major}.{minor}.{build} schema.
- Support for
ExpectedConditions
. By implementing theBy
class, V2 of the extensions library will come with the support forExpectedConditions
. - Support for page objects. By implementing the
By
class, V2 of the exntesions library will come with the support for Selenium page objects. - Changes to the static
By
implementations. There will still be aBy
class provided with static methods for creating all sorts of selectors, however it will simply be a wrapper on a base class that will also provide methods for the new selectors. - Namespace change. The namespace of the extensions library is going to be changed from
Selenium.WebDriver.Extensions
toOpenQA.Selenium
which will make integration with Selenium even easier.
- Make sure that you are not using any of the removed features mentioned above. If you do you should stick with V1 or update your code so it doesn't use the removed features.
- Update the package for
Selenium.WebDriver.Extensions
and removeSelenium.WebDriver.Extensions.Core
,Selenium.WebDriver.Extensions.JQuery
andSelenium.WebDriver.Extensions.Sizzle
packages from your projects. - Replace any reference to
JQuery().Load()
andSizzle().Load()
methods withJQueryLoad()
andSizzleLoad()
calls. - Update the
using
section of your test files by removing old namespaces (V2 works in the same namespace as Selenium core). - Update the alias to
By
class tousing By = OpenQA.Selenium.Extensions.By
.
Using the library
Extending the library