How to use execute javascript keyword in robot framework to enter text into the textbox.
I have tried to locate element by:
${get_code} Execute Javascript document.getElementById('code')
Now I'm trying to input a value into the above element.
Simply enter your script as argument to your keyword. In your case something like this:
Execute Javascript document.getElementById('code').value="Your Text"
See documentation or this answer for additional info.
UPDATE on comment
Kindly suggest a way to iterate the "Press Key" keyword using for loop to make it look simpler
[Documentation] Loops over values from 97 to 118
:FOR ${ascii_code} IN RANGE 97 119
\ Press Key ${code} \\${ascii_code}
Input Textkeyword inSeleniumLibraryExecute Javascript document.getElementById('code').value = '${text_variable}'