AAF ― Applicita LTD
  • Getting Started
  • Development
    • Key Objectives
    • Development Environment & OS
    • Architecture
    • Visual Studio Solution
    • Setup for Local Development
      • Docker & Kubernates
      • Visual Studio Host Builder
  • Web
    • Feature
      • Authentication and Authorization
        • Sign up
        • Sign In
        • Sign out
        • Remember me
        • Recovering password
      • Tenant management
        • Create tenant
        • Search tenant
        • Tenant page
          • Change basic information
          • Change administrator
          • Change branding
          • Change style
          • Change status
          • Assets
        • Delete tenant
      • User management
        • Create user
        • Search user
        • Send email
        • User page
          • Editing page sections
          • Change basic information
          • Change profile picture
          • Change role
          • Change status
        • Delete user
        • Reset users password
      • Role management
        • Create role
        • Search role
        • Role page
          • Change basic information
          • Change status
          • Revoke role
          • Change permissions
          • Interactive permissions button
        • Delete role
      • Bug reporting
  • Testing
    • Testing Environment
    • Atata
    • Architecture
      • Feature structure
      • Common
        • Attributes
        • Components
        • Controls
        • Fixtures
        • Generators
    • Example
Powered by GitBook
On this page

Was this helpful?

  1. Testing
  2. Architecture
  3. Common

Attributes

PreviousCommonNextComponents

Last updated 5 years ago

Was this helpful?

Custom attributes and triggers used on controls and page objects are defined in this section.

Use the following links to learn more about triggers and how to use them:

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:

[FindByName("delete-button")]
[ConfirmDeleteViaSweetAlertModal]
[ReloadUntilEnabled(seconds: 2, reloadCount: 10)]
public Button<ExamplePage, CurrentPage> Delete { get; private set; }

Then you can normally interact with the button in test:

Pages.TestPage().Delete.ClickAndGo()

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.

Atata attributes and triggers
Make your custom wait for loading indicator trigger
Attributes section