Slow execution of keyboard shortcut activity

Hello
My workflow is as follows:

  1. Use Chrome browser
  2. Extract data table
  3. For each row, open a URL (page opens a dialog box automatically)
  4. Use keyboard shortcuts ESC and CTRL+P to close dialog and open print dialog

Steps 1-3 work without any issues. I have set a 5 second delay on the Keyboard Shortcut activity, however it takes around 45-60 seconds to execute.

Weirdly, when I use a breakpoint at the Keyboard Shortcut activity and hit continue, it works fine and is not delayed. Similarly when I isolate these 4 steps into their own project, the process works fine and is not delayed. I am not sure what could be causing the delay.

I have tried:

  • Splitting up the two keyboard shortcuts
  • Adjusting the delay time (+/-)
  • Disabling “Activate” option
  • Changing the input mode

Here are the properties of the Keyboard Shortcut activity.

HI,

For now, can you try to set None at WaitForPageLoad property in KeyboardShortCut as the following?

image

Regards,

This did not fix the problem. Thanks

@ra.systems

Instead of delays use Retry scope or “Do While” loops with a check for element visibility.

Try different Input Methods like “SimulateType”, “SendWindowMessages”

2 Likes

Hello @ra.systems

Try changing the keyboard shortcuts selector to just being the top line only (just the window). See example below:
image

To expand on @rlgandu’s suggestion:

  1. Insert a do while.
  2. Add a Element exists and find an element that indicate you need to send the keyboard shortcuts.
  3. Create a boolean output from element exists.
  4. Insert an IF statement with the condition being just the newly created boolean.
  5. Within the then branch insert the keyboard shortcuts activity.
  6. Insert into the do while condition at the bottom the boolean.

Hopefully this helps

Cheers

Steve

Hello,
Visibility is not the issue. When checking the app state, execution jumps into “Target Appears” and then sits and waits ~1m on “Keyboard Shortcuts” before executing.

As mentioned before, changing the input mode does not make a difference.
Thank you