Atata 2.3.0 is released with several new features and improvements.
Changelog
New Features
- major
#682 Add
DomAttributesproperty toUIComponent<TOwner> - major
#683 Add
DomPropertiesproperty toUIComponent<TOwner> - major
#684 Add
DomClassesproperty toUIComponent<TOwner> - major #686 Add DOM attribute properties to some controls
- minor
#689 Add
TagNameproperty toUIComponent<TOwner> - minor
#692 Add
ConsistOfSingleverification extension methods - minor
#693 Add
Configure<TLogConsumer>()method toLogConsumersAtataContextBuilder - minor
#694 Add
ConsistSequentiallyOfverification extension methods
Changes and Enhancements
- major
#685 Make
UIComponent<TOwner>.Attributesobsolete and replace its usage withDomAttributesandDomProperties - major #687 Use Selenium.WebDriver package v4.5.1
- minor
#690 Add
IsPresentandIsVisibleInViewPortproperties toIUIComponent<TOwner> - minor #691 Remove double quote characters wrapping non-string value in verification log messages
Fixes
- fix #681
BePresent,BeVisible,Exist,BeHiddenverification methods useVerificationTimeout/VerificationRetryIntervalfor 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
DomAttributesproperty toUIComponent<TOwner> - #682 Add
DomPropertiesproperty toUIComponent<TOwner> - #682 Add
DomClassesproperty 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>:
PlaceholderPattern
TextArea<TOwner>:
Placeholder
Link<TOwner>:
HrefHrefAttribue
Image<TOwner>:
SourceAttribueAlt
ImageInput<TOwner>:
SourceAttribue
FileInput<TOwner>:
Accept