Possible to speed up text entry using keyboard.press()?

Ask general questions here.
User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Possible to speed up text entry using keyboard.press()?

Post by Ciege » Tue Apr 21, 2009 9:34 pm

I am using Keyboard.Press() to enter file paths and names into save as dialogs. These paths and names can get quite long (some more than 100 characters long).
In my automation code I am doing this multiple times while testing the exports of each of the reports from the AUT.
My question is, is it possible to speed up the entry of each character using the Keyboard.Press() method?

Code: Select all

Keyboard.Press(strReportsDirectory + "\\" + strExportReportName);
Thanks...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Wed Apr 22, 2009 9:17 am

Hello Ciege,
use the overload from the "Keyboard.Press" function or set the "Keyboard.DefaultKeyPressTime" instead.

e. g.

Code: Select all

Keyboard.Press("kjjdododpsdjfjjhuiohllkjjk", 1); // for 1ms per key press
or

Code: Select all

Keyboard.DefaultKeyPressTime = 1;
Regards,
Christian
Ranorex Support Team

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Post by Ciege » Wed Apr 22, 2009 4:28 pm

Ah, much better. Thank you!