Reducing meantime between two key strokes

Hi everyone,

using RPA.Windows I click on a up/down-key in a FOR loop for example. What I can see is that it takes “quite long” for the next key stroke. Is there an opportunity to enhance the performance or maybe another way to do that?

Best wishes
Guenther

Hi. What is a “quite long” :sweat_smile: and are you using Send Keys keyword for this ?

If yes, then you can set wait_time=0 on the keyword. Or set globally Set Wait Time 0

Hi Mika,

I tried the following:
FOR ${index} IN RANGE 22
click name:“Up” wait_time=0
END
or
${id}= Get Attribute type:Edit name:Age AutomationId
double click id:${id}
FOR ${index} IN RANGE 22
send keys id:${id} keys={UP} wait_time=0
END

Each of the strokes has a meantime of roundabout 1 sec. Is it possible to reduce it or make in faster?

I use now
${id}= Get Attribute type:Edit name:Age AutomationId
double click id:${id}
send keys id:${id} 55

Below is list of my measurements on different methods. I used RPA.Windows library and Windows File Explorer as target application.

The method 3 is the fastest but thing to keep in mind is that click is based on coordinates. So that method can’t be used if element’s coordinates are expected to change between clicks.

  # (1) LOOP TAKES 7.5 seconds (no wait_time set)
  # (2) LOOP TAKES 2.4 seconds (wait_time=0)
  # (3) LOOP TAKES 0.6 seconds (element prefetched, wait_time=0)
  Control Window    Program Files
  ${down}=    Get Element    Line down
  ${up}=    Get Element    Line up
  FOR    ${_}    IN RANGE    10
      # method 1
      # Click    Line down
      # method 2
      # Click    Line down    wait_time=0
      # method 3
      Click    ${down}    wait_time=0
  END
  FOR    ${_}    IN RANGE    10
      # method 1
      # Click    Line up
      # method 2
      # Click    Line up    wait_time=0
      # method 3
      Click    ${up}    wait_time=0
  END

Wow, that works great! Thanks a lot!

1 Like