Atata 2.3.0 is released with several new features and improvements.
Changelog
New Features
- major
#682 Add
DomAttributes
property toUIComponent<TOwner>
- major
#683 Add
DomProperties
property toUIComponent<TOwner>
- major
#684 Add
DomClasses
property toUIComponent<TOwner>
- major #686 Add DOM attribute properties to some controls
- minor
#689 Add
TagName
property toUIComponent<TOwner>
- minor
#692 Add
ConsistOfSingle
verification extension methods - minor
#693 Add
Configure<TLogConsumer>()
method toLogConsumersAtataContextBuilder
- minor
#694 Add
ConsistSequentiallyOf
verification extension methods
Changes and Enhancements
- major
#685 Make
UIComponent<TOwner>.Attributes
obsolete and replace its usage withDomAttributes
andDomProperties
- major #687 Use Selenium.WebDriver package v4.5.1
- minor
#690 Add
IsPresent
andIsVisibleInViewPort
properties toIUIComponent<TOwner>
- minor #691 Remove double quote characters wrapping non-string value in verification log messages
Fixes
- fix #681
BePresent
,BeVisible
,Exist
,BeHidden
verification methods useVerificationTimeout
/VerificationRetryInterval
for waitings - fix #688 An extra “/” prepends a name of
ControlList<TItem, TOwner>
value providers
UIComponent<TOwner>.Attributes Property Is Replaced With DomAttributes, DomProperties and DomClasses
Old Atata UIComponent<TOwner>.Attributes
property under the hood uses IWebElement.GetAttribute(string)
method of WebDriver.
In WebDriver 4 two new methods were introduced: IWebElement.GetDomAttribute(string)
and IWebElement.GetDomProperty(string)
.
Their functionality is similar but differs,
check out Selenium 4 - Element Attribute and Property Methods for example.
Now it is recommended to use new methods instead of GetAttribute
.
So it was decided to reflect the same enhancement in Atata.
Old UIComponent<TOwner>.Attributes
property is marked as obsolete.
Mostly you’ll need to use DomProperties
instead, DomClasses
for querying classes, and DomAttributes
to get data-*
attributes.
See new properties corresponding issues for details:
- #682 Add
DomAttributes
property toUIComponent<TOwner>
- #682 Add
DomProperties
property toUIComponent<TOwner>
- #682 Add
DomClasses
property toUIComponent<TOwner>
New Verification Methods
ConsistOfSingle
Verifies that collection consists of a single item and the item matches the predicateExpression
.
new[] { 1 }.ToSutSubject()
.Should.ConsistOfSingle(x => x == 1);
ConsistSequentiallyOf
Verifies that collection consists sequentially of items that match one by one the predicateExpressions
.
new[] { 1, 2 }.ToSutSubject()
.Should.ConsistSequentiallyOf(x => x == 1, x => x == 2);
New Properties Added to Controls
Input<TValue, TOwner>
:
Placeholder
Pattern
TextArea<TOwner>
:
Placeholder
Link<TOwner>
:
Href
HrefAttribue
Image<TOwner>
:
SourceAttribue
Alt
ImageInput<TOwner>
:
SourceAttribue
FileInput<TOwner>
:
Accept