Skip to content

Commit

Permalink
releasing 1.0.0-alpha06
Browse files Browse the repository at this point in the history
  • Loading branch information
yashaka committed May 12, 2021
1 parent fae2c36 commit 2cd52d6
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 77 deletions.
16 changes: 13 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
83 changes: 10 additions & 73 deletions NSelene/NSelene.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageId>NSelene</PackageId>
<Version>1.0.0-alpha05</Version>
<Version>1.0.0-alpha06</Version>
<Authors>yashaka</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Copyright>Copyright (c) 2015-2021 Iakiv Kramarenko</Copyright>
Expand All @@ -23,78 +23,15 @@
</PackageDescription>

<PackageReleaseNotes>
- 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
</PackageReleaseNotes>

<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 2cd52d6

Please sign in to comment.