Atata 1.9.0 is released with new behavior attributes, new editable text controls and enhancement of log.
Changelog
New Features
- major #421 Click behavior functionality
- minor
#422 Add
DispatchEvent
method toUIComponentScriptExecutor<TOwner>
- major #423 Double-click behavior functionality
- major #424 Right-click behavior functionality
- major #425 Value set behavior functionality
- major #426 Value clear behavior functionality
- major #428 Value get behavior functionality
- major
#429 Add
EditableTextField<T, TOwner>
control - major
#432 Add
ContentEditor<TOwner>
control - major
#433 Add
FrameWrappedContentEditor<TOwner>
control - major
#434 Add
Type(string text)
method toEditableTextField<T, TOwner>
with value type behavior implementation - minor
#437 Add
Stringifier
class - minor
#440 Add
ExecuteSection
methods toLogManager
- minor
#441 Add
NestingLevel
property toLogEventInfo
- minor
#442 Add result properties to
LogSection
- minor
#443 Add extension methods for
ISearchContext
that wrap actual methods with log sections - minor
#444 Add extension methods for
IWebElement
that wrap actual methods with log sections - minor #446 Wrap behavior execution with log section
- minor #447 Wrap trigger execution with log section
- minor
#449 Add extra overloaded
SwitchToFrame
andSwitchToRoot
methods toPageObject<TOwner>
- minor
#450 Add
SwitchToWindow
method toPageObject<TOwner>
- minor
#452 Add extension methods for
RemoteWebDriver
that wrap actual methods with log sections - minor #453 Add log consumer configuration properties for hierarchical prefixes customization
Changes and Enhancements
- minor
#427 Update
SetValue
method ofInput<T, TOwner>
andTextArea<TOwner>
to callOnClear
method when value is null or empty - minor
#430 Inherit
Input<T, TOwner>
fromEditableTextField<T, TOwner>
- minor
#431 Inherit
TextArea<TOwner>
fromEditableTextField<T, TOwner>
- minor
#435 Deprecate
Input<T, TOwner>.Append(string value)
method - minor
#436 Deprecate
TextArea<TOwner>.Append(string value)
method - major
#439 Use
Atata.WebDriverExtras
package v1.4.0 - minor
#445 Replace
Data*LogSection
classes withValue*LogSection
classes - minor
#451 Deprecate
SwitchTo
method ofPageObject<TOwner>
- minor
#454 Use
Stopwatch
to calculate pure test execution time - minor
#455 Use
Stopwatch
inLogSection
to calculate execution time - minor
#456 Use
Stopwatch
to calculate total test execution time - minor
#457 Add collection conversion support to
ObjectConverter
- minor
#458 Add script result conversion thru
IObjectConverter
to methods ofUIComponentScriptExecutor<TOwner>
Fixes
- fix #438 Negative
WaitTo
andExpectTo
verifications are treated like negativeShould
assertions
New Behavior Attributes
New bahaviors added:
- Click (see #421)
- Double-click (see #423)
- Right-click (see #424)
- Value set (see #425)
- Value clear (see #426)
- Value get (see #428)
- Text type (see #434)
Now you can change the default bahavior of actions above with one of the provided alternative behaviors or with the custom one. It should not be an often thing to change the default behavior, but for some UI elements in rare cases it can be valid.
Editable Text Controls
New EditableTextField<T, TOwner> Control
The new base EditableTextField<T, TOwner>
control is introduced.
Similar functionality of Input<T, TOwner>
and TextArea<TOwner>
is extracted to it.
Both these controls now inherit EditableTextField<T, TOwner>
.
New ContentEditor<TOwner>
and FrameWrappedContentEditor<TOwner>
controls also inherit EditableTextField<T, TOwner>
.
New ContentEditor<TOwner> Control
Represents the content editor control (any element with contenteditable='true'
or contenteditable=''
attribute).
This control is good to use for WYSIWYG editors.
New FrameWrappedContentEditor<TOwner> Control
Represents the frame-wrapped content editor control. This control is good to use for iframe-based WYSIWYG editors.
New Trace Log Messages
Much more trace log messages are here to help you debug tests.
List of events/actions that are now tracked as trace log messages:
- Find element(s).
- Perform
IWebElement
actions:Click
,SendKeys
andClear
. - JavaScript execution.
- Frame switching.
- Behavior execution.
- Trigger execution.
As before, you can configure log consumer to track only messages with log level >= Info
, skipping Trace
level.
AtataContext.GlobalConfiguration
// ...
.AddNLogLogging()
.WithMinLevel(LogLevel.Info);
New Log Sections Scructure
Hierarchical structure of log is introduced.
2020-12-15 16:12:24.6616 INFO > Set "Somename" to "Name" text input
2020-12-15 16:12:24.6646 TRACE - > Execute behavior ValueSetUsingClearAndSendKeysAttribute against "Name" text input
2020-12-15 16:12:24.6945 TRACE - - > Find visible element by XPath ".//*[normalize-space(@id) = 'text-input']/descendant-or-self::input[@type='text' or not(@type)]" in ChromeDriver
2020-12-15 16:12:24.7305 TRACE - - < Find visible element by XPath ".//*[normalize-space(@id) = 'text-input']/descendant-or-self::input[@type='text' or not(@type)]" in ChromeDriver (0.035s) >> Element { Id=28545459-d1e0-4b70-8854-1c2133597129 }
2020-12-15 16:12:24.7315 TRACE - - > Clear element { Id=28545459-d1e0-4b70-8854-1c2133597129 }
2020-12-15 16:12:24.7585 TRACE - - < Clear element { Id=28545459-d1e0-4b70-8854-1c2133597129 } (0.027s)
2020-12-15 16:12:24.7595 TRACE - - > Send keys "Somename" to element { Id=28545459-d1e0-4b70-8854-1c2133597129 }
2020-12-15 16:12:24.8185 TRACE - - < Send keys "Somename" to element { Id=28545459-d1e0-4b70-8854-1c2133597129 } (0.058s)
2020-12-15 16:12:24.8185 TRACE - < Execute behavior ValueSetUsingClearAndSendKeysAttribute against "Name" text input (0.154s)
2020-12-15 16:12:24.8185 INFO < Set "Somename" to "Name" text input (0.157s)
2020-12-15 16:12:24.8215 INFO > Assert: "Name" text input value should equal "Somename"
2020-12-15 16:12:24.8235 TRACE - > Execute behavior ValueGetFromValueAttribute against "Name" text input
2020-12-15 16:12:24.8265 TRACE - - > Find visible element by XPath ".//*[normalize-space(@id) = 'text-input']/descendant-or-self::input[@type='text' or not(@type)]" in ChromeDriver
2020-12-15 16:12:24.8455 TRACE - - < Find visible element by XPath ".//*[normalize-space(@id) = 'text-input']/descendant-or-self::input[@type='text' or not(@type)]" in ChromeDriver (0.019s) >> Element { Id=28545459-d1e0-4b70-8854-1c2133597129 }
2020-12-15 16:12:24.8535 TRACE - < Execute behavior ValueGetFromValueAttribute against "Name" text input (0.030s) >> "Somename"
2020-12-15 16:12:24.8545 INFO < Assert: "Name" text input value should equal "Somename" (0.033s)