0

I am writing Junit test cases using SWTBot. One such test case is on Keyboard. I have written a test case using pressKeyBoardShortCut(keystroke) and i am passing keystrokes, but it is dependent on my physical keyboard of my system. I dont want my test case to depend on physical keyboard. Is there way i can use automated keyboard in SWTBot or any other way to avoid physical keyboard so that when ever a keyboard test case is run it run fine even though the keyboard is not connected to system.

Please let me know, waiting for the replies.

1 Answers1

0

SWTBot supports a few keyboards layouts to map character to keycode. If a keyboard layout is not supported, it will fail back to English so it may note produce the expected behaviour (because it won't create the right keyboard events). You should consider contributing the keyboard layout that is missing so it would work as expected for you https://wiki.eclipse.org/SWTBot/Keyboard_Layouts#Creating_keyboard_layouts .

Mickael
  • 3,506
  • 1
  • 21
  • 33