org.eclipse.swtbot.swt.finder.utils
Class SWTBotPreferences

java.lang.Object
  extended by org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences
All Implemented Interfaces:
SWTBotPreferenceConstants

public class SWTBotPreferences
extends Object
implements SWTBotPreferenceConstants

Holds the preferences for the SWT Bot.

Since:
1.1
Version:
$Id$
Author:
Ketan Padegaonkar <KetanPadegaonkar [at] gmail [dot] com>

Nested Class Summary
static class SWTBotPreferences.KeyboardLayoutDetector
           
 
Field Summary
static String DEFAULT_KEY
          The default key used to match SWT widgets.
static long DEFAULT_POLL_DELAY
          The default time delay between successive polling while waiting for a condition to be evaluated.
static String KEYBOARD_LAYOUT
          The keyboard layout.
static String KEYBOARD_STRATEGY
          The default keyboard strategy.
static int MAX_ERROR_SCREENSHOT_COUNT
          The maximum number of screenshots that SWTBot should capture.
static long PLAYBACK_DELAY
          The speed of playback in milliseconds.
static String RECORDER_FILE_NAME
          Deprecated. - this will be removed in future versions
static String SCREENSHOT_FORMAT
          The screenshot image format to be used.
static String SCREENSHOTS_DIR
          The directory in which screenshots should be generated.
static long TIMEOUT
          The timeout for finding widgets among other things.
static int TYPE_INTERVAL
          The the time interval in milliseconds between typing characters in a string.
 
Fields inherited from interface org.eclipse.swtbot.swt.finder.utils.SWTBotPreferenceConstants
KEY_DEFAULT_KEY, KEY_DEFAULT_POLL_DELAY, KEY_KEYBOARD_LAYOUT, KEY_KEYBOARD_STRATEGY, KEY_MAX_ERROR_SCREENSHOT_COUNT, KEY_PLAYBACK_DELAY, KEY_RECORER_FILE_NAME, KEY_SCREENSHOT_FORMAT, KEY_SCREENSHOTS_DIR, KEY_TIMEOUT, KEY_TYPE_INTERVAL
 
Constructor Summary
SWTBotPreferences()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_KEY

public static String DEFAULT_KEY
The default key used to match SWT widgets. Defaults to org.eclipse.swtbot.widget.key. To set another default use the system property "org.eclipse.swtbot.search.defaultKey".


TIMEOUT

public static long TIMEOUT
The timeout for finding widgets among other things. Defaults to 5000ms. To set another default use the system property "org.eclipse.swtbot.search.timeout".


RECORDER_FILE_NAME

public static String RECORDER_FILE_NAME
Deprecated. - this will be removed in future versions
The name of the file in which the recorder records. Defaults to "swtbot.record.txt". To set another default, use the system property "org.eclipse.swtbot.recorder.file.name".


PLAYBACK_DELAY

public static long PLAYBACK_DELAY
The speed of playback in milliseconds. Defaults to 0. To set another default, use the system property org.eclipse.swtbot.playback.delay.


MAX_ERROR_SCREENSHOT_COUNT

public static int MAX_ERROR_SCREENSHOT_COUNT
The maximum number of screenshots that SWTBot should capture. Defaults to 100. To set another default use the system property "org.eclipse.swtbot.screenshots.error.maxcount".


SCREENSHOTS_DIR

public static String SCREENSHOTS_DIR
The directory in which screenshots should be generated. Defaults to "screenshots". To set another default use the system property "org.eclipse.swtbot.screenshots.dir".


SCREENSHOT_FORMAT

public static String SCREENSHOT_FORMAT
The screenshot image format to be used. Defaults to "jpeg". To set another default use the system property "org.eclipse.swtbot.screenshots.format". The value must be one these: BMP, GIF, ICO, JPEG, JPG, PNG or TIFF.


KEYBOARD_LAYOUT

public static String KEYBOARD_LAYOUT
The keyboard layout. This value is autodetected at runtime. This can be set using the system property "org.eclipse.swtbot.keyboard.layout".

Note: the layout must be of the form foo.bar.baz.[MAC_][LANGUAGE_][COUNTRY_][VARIANT_] This expects a file named "foo/bar/baz/[MAC_][LANGUAGE_][COUNTRY_][VARIANT_].keyboard"

Eg:
Layout Name Configuration File
com.foo.bar.MAC.EN.US com/foo/bar/MAC_EN_US.keyboard
com.foo.bar.MAC.EN_GB com/foo/bar/MAC_EN_GB.keyboard
com.foo.bar.FR_FR com/foo/bar/FR_FR.keyboard
com.foo.bar.DE /com/foo/bar/DE.keyboard

See Also:
Locale

TYPE_INTERVAL

public static int TYPE_INTERVAL
The the time interval in milliseconds between typing characters in a string. Defaults to 50ms. To set another default use the system property org.eclipse.swtbot.keyboard.interval.


KEYBOARD_STRATEGY

public static String KEYBOARD_STRATEGY
The default keyboard strategy. Defaults to org.eclipse.swtbot.swt.finder.keyboard.AWTKeyboardStrategy. To set another default use the system property org.eclipse.swtbot.keyboard.strategy. This property must be set to a subclass of KeyboardStrategy.

See Also:
KeyboardStrategy, Keyboard

DEFAULT_POLL_DELAY

public static final long DEFAULT_POLL_DELAY
The default time delay between successive polling while waiting for a condition to be evaluated. Defaults to 500ms. To set another default use the system property "org.eclipse.swtbot.playback.poll.delay".

See Also:
SWTBotFactory.waitUntil(ICondition, long, long), SWTBotFactory.waitWhile(ICondition, long, long)
Constructor Detail

SWTBotPreferences

public SWTBotPreferences()