I am using Robot Framework for test automation. I have a test case where when the user enters an email address and presses TAB only, and then the next field, NAME, is enabled, otherwise it is disabled. How can I automate this?
3
votes
5 Answers
3
votes
Using Selenium2Library of Robot Framework, we can use the Press Keys keyword. It's very easy and has support for a lot of keys including the "command" button for MAC.
Press Keys locator TAB
For all supported keys and their names, go to Selenium keys.
2
votes
You can try the PyAutoGUI library for pressing any key from keyboard.
After installing, try the below lines for tab:
Keydown. tab
Keyup tab
1
votes
press key | <locator...> | \\09
. If you then want to hit Enter key - replace the\\09
with\\13
. Read more about it here robotframework.org/Selenium2Library/… - Goralight