Attributes
Last updated
Was this helpful?
Last updated
Was this helpful?
Custom attributes and triggers used on controls and page objects are defined in this section.
Good example is ReloadUntilEnabled
attribute which, if applied to a control, will reload the page until that control becomes enabled (you can specify retry interval and number of times it will reload the page).
Another example is ConfirmDeleteViaSweetAlertModal
attribute.
Delete buttons in user interfaces usually have a confirmation modal window which pops up after you use them. To simplify testing of these buttons, since we are using Sweet Alert Modal component in AAF, you can use ConfirmDeleteViaSweetAlertModal
attribute when you need to simulate user confirming he wants to delete something when the window pops up.
Here is a code snippet showing you how to use both of these attributes on a button:
Then you can normally interact with the button in test:
Page will reload 10 times every two seconds, or until delete button becomes visible, then it will click the button and confirm delete action in modal window that pops up.