Skip to main content

One post tagged with "desktopautomation"

View All Tags

· 2 min read

Using Send Keys

Desktop automation activities sometimes fail to perform their tasks due to the unavailability of a UI element at runtime. When you encounter such scenarios, you can work around and perform automation using Send Keys activity. This blog explains multiple scenarios where Send Keys could be an alternative solution.

1. Selecting menu options

Typically, we select menu options using the Mouse Click activity. In case of unavailability of the element, Mouse Click fails to operate. In these scenarios, you can use the Send Keys activity with the '[DownArrow]...[Enter]' key to select the menu option. 'Send Keys' does not depend on the UI element to be available, ensuring that the actual mouse click activity is replaced with key-based menu operations.

2. Selecting the Radio Button

Typically, we use Select Radio Button to automate operations on Radio Button UI elements. However, when the activity fails due to the unavailability of the UI element, we could try to achieve the automation using Mouse Click activity. If this fails, then we can try with the Send Keys activity with the '[Space]' key to select the radio button.

3. Selecting the Checkbox

Typically, we use Set Checkbox State to automate Checkbox UI elements. If it fails, we can try to achieve the automation of Checkbox using Mouse Click activity. If this also fails, then an alternate way to automate is using Send Keys activity with the '[Space]' key to toggle the Checkbox state.

4. Populating Textbox

Typically, we use the Populate Text Field activity to fill in text inside a field. If it fails, another way to work is using Send Keys activity with the text data which writes inside the textbox.

Mouse Click and Mouse Move activity with X & Y Adjustments

When the Mouse Click or Mouse Move activities are unable to find a particular element(A), we can indicate the nearby element(B) and make the X & Y adjustment in the activity to reach that element(A).

Find the unavailable element location manually by adjusting the X, Y, or both values. Provide the extracted value to X Adjustment and Y Adjustment property of Mouse Click or Mouse Move activities