Focus Management on Input Action

Focus Management on Input Action Overview

The Functionize Input Action is used to enter test data into an input field within the application under test (AUT). This Action Type has numerous action-level settings to fine-tune control of the test action. One of the settings under the Action Details > Settings TAB is called "Don't lose focus".

Don't Lose Focus Checkbox

Don't Lose Focus Checkbox ON

  • This action-level setting is ON by default for Input Actions.
  • This keeps the mouse/cursor in the specific field where the test data was entered.

Don't Lose Focus Checkbox OFF

  • Functionize recommends turning this setting OFF if your application requires a field to lose focus to trigger a message or process that you may need to test.
  • For example, in a Salesforce app, the error message about 'You have entered an invalid format' for the Email field only appears after the field loses focus.

Examples

Don't Lose Focus ON for Input Action

When the "Don't lose focus" setting is ON, the test will not find the error message since the Email field keeps the focus.

Don't Lose Focus OFF for Input Action

When the "Don't lose focus" setting is OFF, the test will find the error message since the Email field loses focus, allowing the message to appear.

How to Configure the Don't Lose Focus Setting

  1. Open the Test Detail Page: Navigate to the test case you want to edit.
  2. Expand the Action: Locate the Input Action and expand it to see the Action Details.
  3. Access Settings TAB: Click on the Settings TAB within the Action Details.
  4. Toggle Don't Lose Focus Checkbox:
    • To keep the focus on the input field, ensure the checkbox is checked.
    • To allow the input field to lose focus, uncheck the checkbox.

By adjusting the "Don't lose focus" setting, you can ensure that your tests accurately simulate user interactions and validate the necessary UI behaviors, such as error message displays.