I need to press Ctrl+PgDwn, the code i used is Keyboard.Press("^{PGDN}");
I'm getting an error saying "Unable to process the expression"
Can you suggest how to press the Ctrl+PgDn Key Event
Keyboard.Press Method
Try this:
Check out this link for acceptible keys for the Keyboard.Press method:
http://msdn.microsoft.com/en-us/library ... .keys.aspx
Code: Select all
Keyboard.Press("{ControlKey down}{PageDown}{ControlKey up}");
http://msdn.microsoft.com/en-us/library ... .keys.aspx
You can try this also
Code: Select all
Keyboard.Down(Keys.ControlKey);
Keyboard.Down(Keys.PageUp);
Keyboard.up(Keys.ControlKey);
Keyboard.Up(Keys.PageUp);
Last edited by thangavel on Fri Aug 14, 2009 2:59 pm, edited 1 time in total.
Regards,
Thangavel.S
Thangavel.S
Re: Keyboard.Press Method
You can try this also.. but it is lengthy code.
The following approach is sounds good
Code: Select all
Keyboard.Down(Keys.ControlKey);
Keyboard.Down(Keys.PageDown);
Keyboard.Up(Keys.PageDown);
Keyboard.Up(Keys.ControlKey);
Code: Select all
Keyboard.Press("{ControlKey down}{PageDown}{ControlKey up}");
Regards,
Thangavel.S
Thangavel.S
Re: Keyboard.Press Method
How to Press Alphabetics in Ranorex............
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Keyboard.Press Method
Hi,
for Alphabetics you can use
http://msdn.microsoft.com/en-us/library ... .keys.aspx
Regards,
Tobias
Support Team
for Alphabetics you can use
Keyboard.Press(Keys.A); Keyboard.Press(Keys.B); Keyboard.Press(Keys.C); Keyboard.Press(Keys.D); ...See following link for more information about Keys enumeration:
http://msdn.microsoft.com/en-us/library ... .keys.aspx
Regards,
Tobias
Support Team
Re: Keyboard.Press Method
Ranorex.Keyboard.Press("This letters will be pressed");Rakesh123 wrote:How to Press Alphabetics in Ranorex............