Search code examples
functionvbscripthp-uft

UFT micCapsLockOff function not working properly - VBScript


I'm working with UFT- HP with VBScript language and trying to use the function micCapsLockOff that turns the caps lock off. The problem is that this fucntion sometimes works and sometimes not. Why is that? may you help?

Thanks...

Follows the code example:

For Index = 0 To 60 Step 1
If WpfWindow("window").Exist(0) Then
    WpfWindow("window").Activate
    WpfWindow("window").Type micCapsLockOff
    WpfWindow("window").Click
    End If
Next

Solution

  • I got the solution, this is because I was debugging the code. When I just run it, it worked fine.