From 2cd52d66eac8ddd0560ccd8d3daea975dacdf78f Mon Sep 17 00:00:00 2001 From: Iakiv Kramarenko Date: Wed, 12 May 2021 15:22:54 +0300 Subject: [PATCH] releasing 1.0.0-alpha06 --- CHANGELOG.md | 16 ++++++-- NSelene/NSelene.csproj | 83 +++++------------------------------------- README.md | 5 ++- 3 files changed, 27 insertions(+), 77 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8122ed3..826ca9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,11 +5,21 @@ - do we need SeleneDriver anymore? (if we go the direction of SeleneBrowser) -## 1.0.0-alpha06 (to be released on 2021.05.??) +## 1.0.0-alpha07 (to be released on 2021.05.??) - deprecate the majority of Selene.* (except S, SS) when providing alternative API via Browser.* - -## 1.0.0-alpha05 (to be released on 2021.04.28) +## 1.0.0-alpha06 (to be released on 2021.05.12) +- turned off "waiting for no overlay" that was built-in in alpha05 in all actions. ([#85](https://github.com/yashaka/NSelene/issues/85)) + - cause it could break some NSelene + Appium mobile tests that can't use JS, while this waiting was built on top of JS so it's relevant only for web... + - yet the Configuration.WaitForNoOverlapFoundByJs was added (false by default) + - so you can turn it on globally by Configuration.WaitForNoOverlapFoundByJs = true + - or per element by element.With(waitForNoOverlapFoundByJs: true) + - in future we might made this waiting enabled by default, when we provide better docs and plugins to work with Appium +- added rendering of elements under overlay into errors ([#84](https://github.com/yashaka/NSelene/issues/84)) + - made rendering elements HTML – lazy (when waiting for no overlap) + - should improve performance in context of polling during waiting + +## 1.0.0-alpha05 (released on 2021.04.28) ### SUMMARY: * upgraded waiting of commands, error messages, thread local configuration, etc. (see CHANGELOG for more details) diff --git a/NSelene/NSelene.csproj b/NSelene/NSelene.csproj index 5e806e1..a193138 100644 --- a/NSelene/NSelene.csproj +++ b/NSelene/NSelene.csproj @@ -3,7 +3,7 @@ netstandard2.0 NSelene - 1.0.0-alpha05 + 1.0.0-alpha06 yashaka MIT Copyright (c) 2015-2021 Iakiv Kramarenko @@ -23,78 +23,15 @@ -- added `Be.Not.*` and `Have.No.*` as entry points to "negated conditions" -- `.ShouldNot` is obsolete now, use `.Should(Be.Not.*)` or `.Should(Have.No.*)` instead -- added `Condition#Not` property, `Condition#Or(condition)`, `Condition#And(condition)` -- added SeleneElement extensions - - `.JsScrollIntoView()` - - `.JsClick(centerXOffset=0, centerYOffset=0)` - - proper tests coverage is yet needed - - the same can be achieved through (can be handy when storing element in var) - `element.With(clickByJs: true).Click()` - - `.JsSetValue(value)` - - the same can be achieved through - `element.With(setValueByJs: true).SetValue(value)` - - `.JsType(value)` - - the same can be achieved through - `element.With(typeByJs: true).Type(value)` -- made Configuration.* ThreadLocal -- added SeleneElement methods: - - `WaitUntil(Condition)` – like Should, but returns false on failure - - `Matching(Condition)` - the predicate, like WaitUntil but without waiting - - `With([driver], [timeout], [pollDuringWaits], [setValueByJs], [typeByJs], [clickByJs])` - to override corresponding selene setting from Configuration - - usage: `element.With(timeout: 2.0)` - - `_With_(_SeleneSettings_)` option to fully disconnect element config from shared Configuration - - underscores mean that method signature might change... - - usage: `element._With_(Configuration.New(timeout: 2.0))` -- added SeleneCollection methods: - - `WaitUntil(Condition)` – like Should, but returns false on failure - - `Matching(Condition)` - the predicate, like WaitUntil but without waiting - - `With([driver], [timeout], [pollDuringWaits], [setValueByJs], [typeByJs], [clickByJs])` - to override corresponding selene setting from Configuration - - `_With_(_SeleneSettings_)` option to fully disconnect element config from shared Configuration - - underscores mean that method signature might change... - - usage: `elements._With_(Configuration.New(timeout: 2.0))` -- added SeleneDriver methods: - - `WaitUntil(Condition)` – like Should, but returns false on failure - - `Matching(Condition)` - the predicate, like WaitUntil but without waiting - - `With([driver], [timeout], [pollDuringWaits], [setValueByJs], [typeByJs], [clickByJs])` - to override corresponding selene setting from Configuration - - `_With_(_SeleneSettings_)` option to fully disconnect element config from shared Configuration - - underscores mean that method signature might change... - - usage: `elements._With_(Configuration.New(timeout: 2.0))` -- tuned selene elements representation in error messages - - now code like `SS(".parent").FilterBy(Be.Visible)[0].SS(".child").FindBy(Have.CssClass("special")).S("./following-sibling::*")` - - renders to: `Browser.All(.parent).By(Visible)[0].All(.child).FirstBy(has CSS class 'special').Element(./following-sibling::*)` -- improved waiting (waits not just for visibility but till "being passed") at SeleneElement's: - - (... wait till visible and not overlapped) - - Click() - - Hover() - - DoubleClick() - - Submit() - - Clear() - - SetValue(keys) - - Type(keys) - - PressEnter() - - PressEscape() - - PressTab() - - (... wait till visible for all but `input[type=file]`) - - SendKeys(keys) -- upgraded waiting to new engine in asserts (.Should(condition)) of - - SeleneElement - - SeleneCollection -- *Deprecated (Marked as Obsolete)* - - `Configuration.WebDriver` (use `Configuration.Driver` instead) - - it also becomes a recommended wa - - to set driver: `Configuration.Driver = myDriverInstance` - - over `Selene.SetWebDriver(myDriverInstance)` - - that might be deprecated in future - - also take into account that in frameworks like NUnit3, - when you tear down driver in OneTimeTearDown (that will be executed after all test methods) - ensure you do this by calling `Quit` on your own instance like `myDriverInstance.Quit()` - DON'T do it like `Configuration.Driver.Quit()` or `Selene.GetWebDriver().Quit()` - cause this will lead in memory leaked driver, this is NUnit thing, not NSelene:) - (you still can do the latter in TearDown method that will be executed after each test method) -- **potential breaking changes**: - - Switched to System.TimeoutException in some waits (instead of WebDriverTimeoutException) +- turned off "waiting for no overlay" that was built-in in alpha05 in all actions. ([#85](https://github.com/yashaka/NSelene/issues/85)) + - cause it could break some NSelene + Appium mobile tests that can't use JS, while this waiting was built on top of JS so it's relevant only for web... + - yet the Configuration.WaitForNoOverlapFoundByJs was added (false by default) + - so you can turn it on globally by Configuration.WaitForNoOverlapFoundByJs = true + - or per element by element.With(waitForNoOverlapFoundByJs: true) + - in future we might made this waiting enabled by default, when we provide better docs and plugins to work with Appium +- added rendering of elements under overlay into errors ([#84](https://github.com/yashaka/NSelene/issues/84)) + - made rendering elements HTML – lazy (when waiting for no overlap) + - should improve performance in context of polling during waiting true diff --git a/README.md b/README.md index 184cf0c..d688175 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ For docs see tests in the [NSeleneTests](https://github.com/yashaka/NSelene/blob ## Versions -* Upcomig version to use is just released [1.0.0-alpha05](https://www.nuget.org/packages/NSelene/1.0.0-alpha05) +* Upcomig version to use is just released [1.0.0-alpha06](https://www.nuget.org/packages/NSelene/1.0.0-alpha06) * targets netstandard2.0 * net45 support may be added later * it differs from [0.0.0.7](https://www.nuget.org/packages/NSelene/0.0.0.7) in the following: @@ -101,6 +101,9 @@ NSelene has no fully automatic driver management. Given the [WebDriverManager] i string chromeVersion = "Latest"; // e.g. "83.0.4103.39" or "Latest", see https://chromedriver.chromium.org/downloads new DriverManager().SetUpDriver(new ChromeConfig(), version: chromeVersion) Configuration.Driver = new ChromeDriver(); + + // a handy option to enable automatic waiting for no overlay in web tests + Configuration.WaitForNoOverlapFoundByJs = true; } [TearDown]