robotframework-SikuliLibrary icon indicating copy to clipboard operation
robotframework-SikuliLibrary copied to clipboard

`Input Text` looses chars from time to time

Open dschiller opened this issue 4 years ago • 14 comments

*** Settings ***
Library  SikuliLibrary

*** Test Cases ***
Test
  Input Text  \  Test  # Types only `Tet` instead of `Test`

dschiller avatar May 25 '21 18:05 dschiller

Could you have a try "Paste Text"

rainmanwy avatar Nov 19 '21 08:11 rainmanwy

com.github.rainmanwy.robotframework.sikulilib.exceptions.ScreenOperationException: Paste text failed

dschiller avatar Dec 03 '21 13:12 dschiller

How do you do Image could be empty ?

I did it like this:

Paste Text  \  My Text to enter

dschiller avatar Dec 03 '21 13:12 dschiller

Seems

Input Text  \  abcdefghijklmnopqrstuvwxyz

only types abcdefghijkl and the m seems to open the Application Menu.

dschiller avatar Dec 03 '21 13:12 dschiller

Possibly that may also be the failure with the s where it could be invoke a Modifier Key + S.

dschiller avatar Dec 03 '21 13:12 dschiller

Is there a way to avoid modifier keys while typing text only ?

dschiller avatar Dec 03 '21 13:12 dschiller

Interesting: Same happens with pyautogui.

dschiller avatar Dec 03 '21 14:12 dschiller

Seems the letters / keys mM and sS are the ones with issues here. Also y, Y and z, Z are reversed.

dschiller avatar Dec 03 '21 14:12 dschiller

aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
                        ^^          ^^          ^^^^
        doesn't work, seems to      |           |
        open the File Menu          |           |
                        work's only sometimes   |
                                             reversed

dschiller avatar Dec 03 '21 14:12 dschiller

${EMPTY} variable could be used. "Paste Text" should work in new version, and have better performance than "Input Text"

rainmanwy avatar Dec 06 '21 02:12 rainmanwy

Updated to latest SikuliLibrary 2.0.3 and Paste Text doesn't do anything. You sure it types text or it like the name says paste text from clipboard ? Also figured out the Input Text doesn't handle special chars as expected. / for example becomes -.

dschiller avatar Dec 08 '21 09:12 dschiller

It seems Input Text uses the english keyboard layout and maps it to the selected one ( german in my case ). Which means when I want to type a / which is Shift + 7 then I need to type a & which is the 7 on the english keyboard layout.

This is bad because then when the keyboard layout changes then it is no longer a /.

Obviously the same then also is valid for yYzZ.

dschiller avatar Dec 08 '21 10:12 dschiller

yes. sikuli doc mentioned about "type" method, Region.type

could you give more details about "Paste Text". I have tried to install 2.0.3, and use "Paste Text" to execute "Paste Text ${EMPTY} République Française", and did not meet any problems.

rainmanwy avatar Dec 08 '21 10:12 rainmanwy

I have this workaround:

...  - PyAutoGUI.Type Text  Nortal Conbat        # It is impossible to type `mMsS` ( `sS` ) only sometimes,
...                                              # also `Y` and `Z` are reversed on macOS with SikuliLibrary
...                                              # and PyAutoGui
...  > Fix: Use `nN` instead of `mM`

But now I must enter a m how can I do that ?

dschiller avatar Dec 08 '21 10:12 dschiller