On 12/16/09 1:18 PM, Lewis Nguyen wrote:
> I am using the typeText method to type a path into a comboBox. I want to
> check to make sure that CAPS LOCK is not activated before typing; and if
> it is, to disable it. How would I do that in SWTBot?
Thanks for the reply.
I don't know if it's appropriate for me to ask for further help on this workaround since it is not part of SWTBot but I created a subclass that extends the Toolkit class in order to access the methods. When I run my test, however, JUnit gets an error saying "java.lang.UnsupportedOperationException: Toolkit.getLockingKeyState".
According to the javadocs, this exception is thrown if the host system doesn't allow getting the state of this key programmatically. It is the same case for setLockingKeyState.
Is there a fix for this?