press and hold control key
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2018
02:03 PM
05-15-2018
02:03 PM
press and hold control key
Hi,
For my desktop application, I want to press, hold and release (after few seconds) the control key.
I tried keydown, keyup but seems nothing is working.
tried below 2 commands but nothing seems working. Can someone please help to resolve this issue?
Aliases.VIP.WinFormsObject("MBSItems2ImportForm").WinFormsObject("msTreeView1").wItems.Item.KeyDown("[Ctrl]");
Aliases.VIP.WinFormsObject("MBSItems2ImportForm").WinFormsObject("msTreeView1").add_KeyDown("[Ctrl]");
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2018
10:44 PM
05-15-2018
10:44 PM
Try this, this should work:
Sys.Desktop.KeyDown(Win32API.VK_CONTROL); Delay(2000); Sys.Desktop.KeyUp(Win32API.VK_CONTROL);
If you need to hold Ctrl when mouse cursor is above a specific control, you can use HoverMouse method first for that control.
Gennadiy Alpaev
Software Testing Automation Tips - my new book
TestComplete Cookbook is published!
About Community Experts
