Forum Discussion
Alicya619
Occasional Contributor
I tried this
Sys.Desktop.KeyDown(VK_CONTROL);
item1.Click();
item2.Click();
item3.Click();
Sys.Desktop.KeyUp(VK_CONTROL);
item1.Click();
item2.Click();
item3.Click();
Sys.Desktop.KeyUp(VK_CONTROL);
And I get the expected for behavior, my 3 items are correctly selected..
The issue it really to press continuously on a key, if I'm pressing during two seconds on 'a' I will expect a result like this : 'aaaaaaaaaaaaaaa' but what I get is 'a'.
Alicya
AlexKaras
4 years agoChampion Level 3
Hi Alicya,
As per https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/common-for-sys-desktop-pda/keys-method-sys-desktop-object.html, what if you try something like this:
<object>.Keys("[Hold]a[P2000][Release]");
<object>.Keys("[Hold][Up][P2000][Release]");
Does it help?
- Alicya6194 years agoOccasional Contributor
Hello,
The code given
<object>.Keys("[Hold]a[P2000][Release]"); => nothing
<object>.Keys("[Hold][Up][P2000][Release]"); => increase one unit
If I tried this :
Sys.Desktop.Keys("[Hold][Up]");
aqUtils.Delay(5000);
Sys.Desktop.Keys("[Up][Release]");
aqUtils.Delay(3000);
Sys.Desktop.Keys("[Hold][Up]");I will have 3 unit increasement, one for each 'Keys' command lines
Thanks