Atata 3.12.0 is released with a DOM mutation waiting functionality and an upgrade of Selenium.WebDriver to v4.45.0.
Changelog
Added
- Add DOM mutation waiting functionality.
Changed
- Upgrade Selenium.WebDriver package reference to v4.45.0.
- Upgrade Atata.WebDriverExtras package reference to v3.8.0.
DOM mutation waiting
Now you can wait for DOM mutation start and end. It is possible to do for a whole page or particular component. For that you can use either script methods or trigger attributes.
DOM mutation script execution methods
The new methods added to UIComponentScriptExecutor<TOwner>:
WaitForDomMutation(). Waits for the first DOM mutation event inside the current component.WaitForDomImmutableState(). Waits for the current component to have an immutable/stable DOM. There should not be any DOM mutation events inside the component for the specified time span. The immutable state time is 100 milliseconds by default.WaitForDomImmutableState(TimeSpan immutableStateTime). Waits for the current component to have an immutable/stable DOM. There should not be any DOM mutation events inside the component for the specified time span.
Usage
component.Script.WaitForDomMutation();
component.Script.WaitForDomImmutableState();
DOM mutation trigger attributes
WaitForDomMutationEndAttribute. Indicates that a waiting should be performed for the self or targeted component DOM mutation to end. By default ifControlNameis not specified, the waiting will be performed for the current component.WaitForDomMutationStartAndEndAttribute. Indicates that a waiting should be performed for the self or targeted component DOM mutation to start and end. By default ifControlNameis not specified, the waiting will be performed for the current component.WaitForPageObjectDomMutationEndAttribute. Indicates that the waiting should be performed for the page object DOM mutation to end.WaitForPageObjectDomMutationStartAndEndAttribute. Indicates that the waiting should be performed for the page object DOM mutation to start and end.
Usage
[WaitForPageObjectDomMutationEnd(TriggerEvents.Init)]
public class SomePage : Page<_>
{
}
[WaitForDomMutationEnd(TriggerEvents.Init)]
public Control<_> SomeControl { get; private set; }
[WaitForDomMutationStartAndEnd(TriggerEvents.AfterClick, ControlName = nameof(AnotherControl))]
public Button<_> SomeButton { get; private set; }
public Control<_> AnotherControl { get; private set; }
WebDriver upgrade
The release contains an upgrade of Selenium.WebDriver package reference from v4.44.0 to v4.45.0. Take a look at Selenium.WebDriver CHANGELOG to find out what was changed there.