Package com.axway.ats.uiengine
Class SwingDriver
- java.lang.Object
-
- com.axway.ats.uiengine.UiDriver
-
- com.axway.ats.uiengine.SwingDriver
-
- Direct Known Subclasses:
SwingDriverInternal
public class SwingDriver extends UiDriver
A driver used for working with a SWING application
-
-
Field Summary
Fields Modifier and Type Field Description protected org.fest.swing.fixture.ContainerFixture<? extends Container>currentContainerCurrent container context used for searching of other componentsprotected booleanisJnlpCachedprotected StringjnlpLocationprotected org.fest.swing.fixture.WindowFixture<? extends Window>windowFixtureCurrent window container.protected StringwindowTitle
-
Constructor Summary
Constructors Modifier Constructor Description protectedSwingDriver(Class<?> mainClassOfTestedApplication)protectedSwingDriver(Class<?> mainClassOfTestedApplication, String windowTitile)protectedSwingDriver(String windowTitile)SwingDriver(String jnlpLocation, boolean cacheEnabled)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SwingEnginegetSwingEngine()voidsetCommandDelay(int commandDelay)Set the delay time between commands
NOTE: It also sets this delay time as a default command delay time ofUiEngineConfiguratorvoidstart()start the drivervoidstop()stop the drivervoidstop(boolean cleanResources)Cleans up any used resources (keyboard, mouse, open windows and) used.ScreenLock-
Methods inherited from class com.axway.ats.uiengine.UiDriver
getChromeDriver, getChromeDriver, getCustomDriver, getEdgeDriver, getEdgeDriver, getFirefoxDriver, getFirefoxDriver, getFirefoxDriver, getHiddenBrowserDriver, getHiddenBrowserDriver, getInternetExplorerDriver, getInternetExplorerDriver, getMobileDriver, getMobileDriver, getPhantomJSDriver, getRobotDriver, getSafariDriver, getSafariDriver, getSwingDriver, getSwingDriver, getSwingDriver, getSwingDriver
-
-
-
-
Field Detail
-
windowTitle
protected String windowTitle
-
jnlpLocation
protected String jnlpLocation
-
isJnlpCached
protected boolean isJnlpCached
-
windowFixture
protected org.fest.swing.fixture.WindowFixture<? extends Window> windowFixture
Current window container. Used also when closing application at the test end
-
currentContainer
protected org.fest.swing.fixture.ContainerFixture<? extends Container> currentContainer
Current container context used for searching of other components
-
-
Constructor Detail
-
SwingDriver
protected SwingDriver(String windowTitile)
- Parameters:
windowTitile- the window title
-
SwingDriver
protected SwingDriver(Class<?> mainClassOfTestedApplication)
- Parameters:
mainClassOfTestedApplication- the class containing the "main" method
-
SwingDriver
protected SwingDriver(Class<?> mainClassOfTestedApplication, String windowTitile)
- Parameters:
mainClassOfTestedApplication- the class containing the "main" methodwindowTitile- the window title
-
SwingDriver
public SwingDriver(String jnlpLocation, boolean cacheEnabled)
- Parameters:
jnlpLocation- JNLP location. It can be local JNLP file path or a remote urlcacheEnabled- whether the JNLP is cached or not
-
-
Method Detail
-
start
public void start()
Description copied from class:UiDriverstart the driver
-
stop
public void stop()
Description copied from class:UiDriverstop the driver
-
stop
public void stop(boolean cleanResources)
Cleans up any used resources (keyboard, mouse, open windows and) used.ScreenLock- Parameters:
cleanResources- iftruerelease UI resources
-
getSwingEngine
public SwingEngine getSwingEngine()
- Returns:
- new SwingEngine instance
-
setCommandDelay
public void setCommandDelay(int commandDelay)
Set the delay time between commands
NOTE: It also sets this delay time as a default command delay time ofUiEngineConfigurator- Parameters:
commandDelay- a value representing the delay time between commands (in milliseconds)
-
-