-
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.Byclass. 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 fromByclass to avoid those kind of tricks. - Removal of redundant core selectors. V1 contains implementation of core Selenium selectors using custom
QuerySelectorclass. The purpose of this class is to wrap the results in customWebElementclass for them to be reused while determining the context of the subsequent call. With the implementation ofByclass, they will no longer be needed and will be removed from the library. - Removal of query selector. As described above,
QuerySelectorclass 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
JQueryHelperclass as an mediator between Selenium core and extensions library. With the new architecture there is no place for theJQueryHelperanymore 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 theByclass, V2 of the extensions library will come with the support forExpectedConditions. - Support for page objects. By implementing the
Byclass, V2 of the exntesions library will come with the support for Selenium page objects. - Changes to the static
Byimplementations. There will still be aByclass 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.ExtensionstoOpenQA.Seleniumwhich 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.Extensionsand removeSelenium.WebDriver.Extensions.Core,Selenium.WebDriver.Extensions.JQueryandSelenium.WebDriver.Extensions.Sizzlepackages from your projects. - Replace any reference to
JQuery().Load()andSizzle().Load()methods withJQueryLoad()andSizzleLoad()calls. - Update the
usingsection of your test files by removing old namespaces (V2 works in the same namespace as Selenium core). - Update the alias to
Byclass tousing By = OpenQA.Selenium.Extensions.By.
Using the library
Extending the library