Im currently using Robot Framework 2.7 with Selenium 2.18 for running my test scripts. In one of my scripts, I have to input the @ sign by using the Press Key Native keyword. The key native value that I have seen for the @ sign is 512
(http://docs.oracle.com/javase/6/docs/api/constant-values.html#java.awt.event.KeyEvent.VK_AT)
but for some reason I get an error whenever it does the Press Key Native 512. The error I get is "ERROR: Problem during keyDown: Invalid key code". Is there a new value assigned for the @ sign?
Note: Press key native keyword in my script works with other values (for letter a I use 65)
Below is the code that I use and little explanation:
@{email_address_in_list_form} = Split Email ${email}
@{email_address_in_number} = Convert Name To Numbers @{email_address_in_list_form}
@{numbers_to_input} = Convert To List ${email_address_in_number}
:For ${number} IN @{numbers_to_input}
\ Press Key Native ${number}
The above code splits an email address to letters and puts it in a list, then the new created list of letters are turned into numbers since Press Key Native keyword uses the java.awt.event.KeyEvent numbers. The For loop now enters the data in specified textfield. And in this for loop the error occurs when it reaches to type the @ sign which has a value of 512. For example an email address admin@test.com, the system types until admin and gets an error on typing the @sign.