Forum Discussion
- HKosova
Alumni
Hi jcruz,
TestComplete automatically turns off Caps Lock before test recording and test runs.
- jcruzContributor
In fact,I had already read that however Test Complete does not turn off the Caps I thought there was a configuration missing
- HKosova
Alumni
What makes you think TestComplete is not turning off Caps Lock? What actions is your test trying to perform, and what exactly does not work as expected?
Please provide more details - script code or keyboard test screenshots, error text from the test log, and so on.
- PeterMitchamOccasional Contributor
If bl is true then caps lock is on. the Keybd event will then turn it off, and the last call tests the keystate again to confirm its off.
bl = cBool(Win32API.GetKeyState(VK_CAPITAL))
If bl then
Call Win32API.keybd_event(VK_CAPITAL, 0, KEYEVENTF_EXTENDEDKEY Or KEYEVENTF_KEYDOWN, 0)
Call Win32API.keybd_event(VK_CAPITAL, 0, KEYEVENTF_EXTENDEDKEY Or KEYEVENTF_KEYUP, 0)
End if
bl = cBool(Win32API.GetKeyState(VK_CAPITAL))