Robotic Process Automation (RPA)

 View Only
  • 1.  Handling Special Characters in Passwords When Using SendKeys in IBM RPA

    Posted 17 days ago

    I am using IBM RPA to automate an SSH login process using the SendKeys command. While executing the following command:

    sendKeys --keys "sshpass -p ${password} ssh ${username}@${ip}~" --viacurrentwindow

    I encounter the error:
    "System.Exception: Group delimiters are not balanced."

    However, when I use only:

    sendKeys --keys "ssh ${username}@${ip}~" --viacurrentwindow

    it works fine. I suspect the issue is related to the password variable (${password}), which contains special characters.

    How can I properly send the full SSH command, ensuring that IBM RPA correctly handles special characters in the password?

    Note:

    When I enabled ignore special character option, it also didn't work.



    ------------------------------
    Muhammad Mahfouz
    AI & Automation Engineer | Applied Data Scientist
    Telecom Egypt
    ------------------------------


  • 2.  RE: Handling Special Characters in Passwords When Using SendKeys in IBM RPA

    Posted 15 days ago

    Hi Muhammad!

    I suggest you open a ticket with the support for them to investigate the issue. Here's the page: https://www.ibm.com/mysupport

    Until then, does using the Type Text command work? Another possible workaround is sending the values to the clipboard using Send to Clipboard and then Paste from Clipboard (need to ensure the window is focused).



    ------------------------------
    Vinicius Marques
    Data Engineer
    Music.AI
    Rio Grande
    ------------------------------



  • 3.  RE: Handling Special Characters in Passwords When Using SendKeys in IBM RPA

    Posted 7 days ago
    Edited by Muhammad Mahfouz 7 days ago

    Hi Vinicius,

    Thank you for your suggestion.

     I actually found a workaround. I split the command into three parts, adding a 1-second delay between each command. Notably, in the second part (where the password is sent), I used the --ignorespecialcharacters flag to handle special characters properly.  Here's what worked for me:

    1. sendKeys --keys "sshpass -p " --viacurrentwindow
    2. delay --timeout "00:00:01"
    3. sendKeys --keys "\"${password}\"" --viacurrentwindow  --igndorespecialcharacters
    4. delay --timeout "00:00:01"
    5. sendKeys --keys " ssh ${username}@${ip}~" --viacurrentwindow

    This approach ensures a smooth execution. Hope this helps others facing a similar issue!



    ------------------------------
    Muhammad Mahfouz
    AI & Automation Engineer | Applied Data Scientist
    Telecom Egypt
    ------------------------------