qentinelqi / qweb

Keyword driven automation for the web
https://github.com/qentinelqi/qweb
Apache License 2.0
40 stars 17 forks source link

'TypeText' only adds the last char of the text to type #96

Closed matthiasdanne closed 2 years ago

matthiasdanne commented 2 years ago

Describe the bug

We observed a strange behavior we can not explain.

We have an Input field where we want to check the behavior of the Input field (Input validation, DB Changes, etc. ) with TypeText. We use TypeTextto either fill a blank input field, or to replace the value of an already filled input field.

When we use

To Reproduce Steps to reproduce the behavior:

Here is a snippet of our Code.

    VerifyText      ${LIEFERLAND_A} # Find line in table
    ClickText       Bearbeiten         anchor=${LIEFERLAND_A}    anchor_type=text # Click edit button
    Sleep           2 # Sleep 2 to ensure that the edit dialog has fully opened
    TypeText        ${LIEFERLAND_A}    ${LIEFERLAND_B} # replace existing with new word

Expected behavior I would expect that ${LIEFERLAND_A} is fully replaced by ${LIEFERLAND_B}, and not that just the last character of ${LIEFERLAND_B} is added to ${LIEFERLAND_A}. The same behavior occurs if we clear the input field first. Then only the last char of the word is written. This also occurs regardless if the word length, wether we want to write/replace a 3-char or a 15-char word, only the last char is added.

Screenshots

qweb_type_text_error1

Desktop (please complete the following information):

Additional context

As a workaround we are using PressKey to type one char at a time. But this is rather unconvenient.

    ClickElement      lieferland-edit-input          tag=input
    ${IS_MAC_OS}=        is_running_on_mac_os
    IF            ${IS_MAC_OS}
        PressKey      ${LIEFERLAND_A}      {COMMAND + A}
    ELSE
        PressKey      ${LIEFERLAND_A}      {CONTROL + A}
    END
    PressKey      ${LIEFERLAND_A}      {BACKSPACE}
    PressKey       lieferland-edit-input    {SHIFT + S}
    PressKey        lieferland-edit-input   p
    PressKey        lieferland-edit-input   a
    PressKey        lieferland-edit-input   n
    PressKey        lieferland-edit-input   i
    PressKey        lieferland-edit-input   e
    PressKey        lieferland-edit-input   n
matthiasdanne commented 2 years ago

This was a bug in our application.

For some reasons the cursor was set to the end of the input field after every inputted value.