nerdexam
Microsoft

PL-500 · Question #38

You have a desktop flow that interacts with a desktop-based application. You plan to enter data into each field by using the Send keys action. You test the flow. The Send keys action runs…

The correct answer is A. Use the Wait for window action. C. Use the Focus window action. When the 'Send keys' action fails to input data into a desktop application, it's often due to the target window not being active or ready; ensuring the window is focused or waiting for it to load can resolve this.

Develop automations

Question

You have a desktop flow that interacts with a desktop-based application. You plan to enter data into each field by using the Send keys action. You test the flow. The Send keys action runs successfully but the input fields are empty. You need to add a step before the Send keys action to resolve the issue. Which two steps can you use? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.

Options

  • AUse the Wait for window action.
  • BUse the Wait for mouse action.
  • CUse the Focus window action.
  • DSet the window state.
  • ESet the key state.

How the community answered

(32 responses)
  • A
    72% (23)
  • B
    3% (1)
  • D
    16% (5)
  • E
    9% (3)

Why each option

When the 'Send keys' action fails to input data into a desktop application, it's often due to the target window not being active or ready; ensuring the window is focused or waiting for it to load can resolve this.

AUse the Wait for window action.Correct

The 'Wait for window' action ensures that the target application window is present and ready before subsequent actions like 'Send keys' are executed, preventing the keys from being sent to the wrong or non-existent window.

BUse the Wait for mouse action.

The 'Wait for mouse' action waits for a mouse event, which is unrelated to ensuring that a window is active or ready to receive keyboard input from 'Send keys'.

CUse the Focus window action.Correct

The 'Focus window' action brings the specified application window to the foreground and makes it the active window, which is crucial for 'Send keys' to direct input correctly into the application's input fields.

DSet the window state.

Setting the window state (e.g., maximize, minimize) affects the window's appearance but does not guarantee that the window is focused or ready to receive keyboard input.

ESet the key state.

Setting the key state typically refers to modifying the state of individual keys, which is not the root cause of 'Send keys' failing to deliver input to an unfocused or unready window.

Concept tested: Desktop flow UI automation - Window focus and readiness

Source: https://learn.microsoft.com/power-automate/desktop-flows-actions-reference#window-actions

Topics

#Desktop flow actions#UI automation#Window management#Send keys troubleshooting

Community Discussion

No community discussion yet for this question.

Full PL-500 Practice