Hi.
I'm using Telerik WebUI to test an Internet Explorer Addon, which has some shortcuts/keybinds to do specific things.
The problem is, I am mapping "AltGr + letter" as my shortcuts but when I execute this in WebUI recordingmode, it directly interpretes this to "Ctrl+Alt+letter". The addon specificly wants a user to press the AltGr, not Ctrl+Alt, hense making the test fail.
How can i force it to press AltGr?
I'm using Telerik WebUI to test an Internet Explorer Addon, which has some shortcuts/keybinds to do specific things.
The problem is, I am mapping "AltGr + letter" as my shortcuts but when I execute this in WebUI recordingmode, it directly interpretes this to "Ctrl+Alt+letter". The addon specificly wants a user to press the AltGr, not Ctrl+Alt, hense making the test fail.
How can i force it to press AltGr?
4 Answers, 1 is accepted
0
Hi Tejs,
Greetings,
Cody
Since it can't be recorded, we'll have to use a coded step to send the "AltGr + letter". Doing a little research it appears this bit of code should do the trick (but I am not 100% certain):
Manager.Desktop.KeyBoard.KeyDown(System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Alt);
Manager.Desktop.KeyBoard.KeyPress(System.Windows.Forms.Keys.A);
Manager.Desktop.KeyBoard.KeyUp(System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Alt);
Cody
the Telerik team
Interested in Agile Testing?
Check out Telerik TV for a recording of
Automated Testing in the Agile Environment
0

Tejs
Top achievements
Rank 1
answered on 10 Jan 2011, 10:15 AM
Hello Cody,
Thanks for your suggestion.
I've tried that and it doesn't work. Manually when testing the addon, AltGr+letter works but Ctrl+Alt+letter doesn't. I think it's something about the code behind the addon, where it doesn't recieve AltGr, but the exact position on the keyboard - AltGr - or something hense making Ctrl+Alt not working.
I guess I have to think outside the box on this one, but thanks for trying.
Thanks for your suggestion.
I've tried that and it doesn't work. Manually when testing the addon, AltGr+letter works but Ctrl+Alt+letter doesn't. I think it's something about the code behind the addon, where it doesn't recieve AltGr, but the exact position on the keyboard - AltGr - or something hense making Ctrl+Alt not working.
I guess I have to think outside the box on this one, but thanks for trying.
0
Hello Tejs,
we found a keyboard with an Alt Gr key here in Bulgaria but noticed no difference between this key and the normal Alt key. In fact I think that the Alt Gr key on our keyboard may be an Alt Gr key in name only - I couldn't find any difference between this key and the normal Alt key. And WebUI records it as an Alt key.
We can say for certain that a coded step, such as previously suggested, is going to be the only solution. All our research on the Internet says to send the ctrl + alt modifiers simultaneously when trying to send the AltGr key in code.
If you can find any bit of code that actually does work for AltGr we can help you insert it into a coded step. At this point, since the previous suggestion did not work as expected we are pretty much stumped.
Regards,
Stoich
the Telerik team
we found a keyboard with an Alt Gr key here in Bulgaria but noticed no difference between this key and the normal Alt key. In fact I think that the Alt Gr key on our keyboard may be an Alt Gr key in name only - I couldn't find any difference between this key and the normal Alt key. And WebUI records it as an Alt key.
We can say for certain that a coded step, such as previously suggested, is going to be the only solution. All our research on the Internet says to send the ctrl + alt modifiers simultaneously when trying to send the AltGr key in code.
If you can find any bit of code that actually does work for AltGr we can help you insert it into a coded step. At this point, since the previous suggestion did not work as expected we are pretty much stumped.
Regards,
Stoich
the Telerik team
Interested in Agile Testing?
Check out Telerik TV for a recording of
Automated Testing in the Agile Environment
0

Tejs
Top achievements
Rank 1
answered on 13 Jan 2011, 04:22 PM
Hi again,
Thanks alot for researching it.
I've come to the conclussion that it won't work with a coded step as suggested, and instead i'm doing a manual step and that's actually fine. We just need to specify how to test our software, so everytime there's a change, the same steps are executed - coded/manual.
But thanks for the feedback anyways :)