How to type special characters using robot

Hello dudes! I’m here again with one simple question that is driving me crazy. I need to type a simple asterisk in one of the tests i’m working in to… I just need to do the program I’m testing to multiply some values and to do that, I need to type this character… but I couldn’t solve this until now. I believe that solving this, all the related issues to typing special characters will be solved too. Could anyone help me pls?

cheers!

Robot Framework is a framework for test automation, which can be used to test many different softwares. That is why we don’t know what kind of software you are testing, so, please say what Library are you using and the type of software where you need to type and asterisk.

(or in other words: Please go straight to the point. You can assume we are here to help.)

2 Likes

Hello Helio! Thank you so much for your attention! I work in a company that build a POS software. So, I need to multiply the products I’m testing the sales. I just left the robot running and executing most of the functions that the software is progammed to do and the most important is saling. What I need to do is something like ‘2 x7891255216225’. To type the ‘x’, to multiply the item, I need to press ‘*’. You know? To do my job, I’m using sikuli library with another ones like faker, PostgreSQLDB, DateTime, String, Collections, etc…

Hi Rafael,

With SikuliLibrary you should be able to simply do something like:

Input text	${EMPTY}	*

* is not a special character for Robot Framework or SikuliX as far as I know

The special keys in SikuliX are documented here and you’d use them like this:

Press Special Key	TAB

Dave.

Also the keyword Type With Modifiers can be used to simulate pressing keys.

Hi damies13!
I have tried doing like this but it just don’t type anything and if i’m not wrong, it raises an error. I gonna try to do it again and post the logs here .

cheers!

I tried doing like this again. It really didn’t raise any error, it doesn’t types anything tho. Following, we can see the code and the log. But I think I discovered what happens… The system I’m testing doesn’t allow me to type something like ‘shift + 8’ to get the ‘’ it only works if I press the '’ on the numeric keypad so I gonna try to solve this in other way.

Code
multiplier

Logs

Hi Helio!
The system I’m testing doesn’t allow me to type ‘SHIFT + 8’ to get the ‘'. It just works if I press the '’ in numeric keypad… so, I’ll have to solve this in another way. Do you know how could I differentiate these keys?

If there is a NUM_8 definition in SikuliX like @damies13 referenced, you can use Press Special Key.

Type With Modifiers 8 SHIFT should work if your keyboard has the same definition of the one in the SUT.

1 Like

If you have an on-screen keyboard then you can use images to click on.

1 Like

Hi Rafael,

I think I see the (a) problem, Input Text is sending a RETURN after sending the key, probably not what you want.

Maybe try:

Press Special Key	*

Not sure if it’ll work or not but worth a try.

otherwise try a Key Down followed by a Key Up

Dave.