Package com.axway.ats.uiengine.engine
Class SwingEngine
- java.lang.Object
-
- com.axway.ats.uiengine.internal.engine.AbstractEngine
-
- com.axway.ats.uiengine.engine.SwingEngine
-
public class SwingEngine extends AbstractEngine
-
-
Field Summary
-
Fields inherited from class com.axway.ats.uiengine.internal.engine.AbstractEngine
elementsFactory, uiDriver
-
-
Constructor Summary
Constructors Constructor Description SwingEngine(UiDriver uiDriver)
-
Method Summary
-
Methods inherited from class com.axway.ats.uiengine.internal.engine.AbstractEngine
getMapSection, loadMapFile, setMapSection
-
-
-
-
Constructor Detail
-
SwingEngine
public SwingEngine(UiDriver uiDriver)
-
-
Method Detail
-
getUtilsElementState
public SwingElementState getUtilsElementState(UiElement uiElement)
- Parameters:
uiElement- the element to work with- Returns:
- a utility class for checking the state of element
-
getButton
public SwingButton getButton(String mapId)
- Parameters:
mapId- the element's map id- Returns:
- a new
SwingButtoninstance
-
getButton
public SwingButton getButton(UiElementProperties properties)
- Parameters:
properties- properties describing this element- Returns:
- a new
SwingButtoninstance
-
getMenuItem
public SwingMenuItem getMenuItem(String mapId)
- Parameters:
mapId- the element's map id- Returns:
- a new
SwingMenuIteminstance
-
getMenuItem
public SwingMenuItem getMenuItem(UiElementProperties properties)
- Parameters:
properties- properties describing this element- Returns:
- a new
SwingMenuIteminstance
-
getPopupMenu
public SwingPopupMenu getPopupMenu(String mapId)
- Parameters:
mapId- the element's map id- Returns:
- a new
SwingPopupMenuinstance
-
getPopupMenu
public SwingPopupMenu getPopupMenu(UiElementProperties properties)
- Parameters:
properties- properties describing this element- Returns:
- a new
SwingPopupMenuinstance
-
getTextArea
public SwingTextArea getTextArea(String mapId)
- Parameters:
mapId- the element's map id- Returns:
- a new
SwingTextAreainstance
-
getTextArea
public SwingTextArea getTextArea(UiElementProperties properties)
- Parameters:
properties- properties describing this element- Returns:
- a new
SwingTextAreainstance
-
getTree
public SwingTree getTree(String mapId)
- Parameters:
mapId- the element's map id- Returns:
- a new
SwingTreeinstance
-
getTree
public SwingTree getTree(UiElementProperties properties)
- Parameters:
properties- properties describing this element- Returns:
- a new
SwingTreeinstance
-
getSingleSelectList
public SwingSingleSelectList getSingleSelectList(String mapId)
- Parameters:
mapId- the element's map id- Returns:
- a new
SwingSingleSelectListinstance
-
getSingleSelectList
public SwingSingleSelectList getSingleSelectList(UiElementProperties properties)
- Parameters:
properties- properties describing this element- Returns:
- a new
SwingSingleSelectListinstance
-
getMultiSelectList
public SwingMultiSelectList getMultiSelectList(String mapId)
- Parameters:
mapId- the element's map id- Returns:
- a new
SwingMultiSelectListinstance
-
getMultiSelectList
public SwingMultiSelectList getMultiSelectList(UiElementProperties properties)
- Parameters:
properties- properties describing this element- Returns:
- a new
SwingMultiSelectListinstance
-
getComboBox
public SwingComboBox getComboBox(String mapId)
- Parameters:
mapId- the element's map id- Returns:
- a new
SwingComboBoxinstance
-
getComboBox
public SwingComboBox getComboBox(UiElementProperties properties)
- Parameters:
properties- properties describing this element- Returns:
- a new
SwingComboBoxinstance
-
getComponent
public SwingComponent getComponent(String mapId)
- Parameters:
mapId- the element's map id- Returns:
- a new
SwingComponentinstance
-
getComponent
public SwingComponent getComponent(UiElementProperties properties)
- Parameters:
properties- properties describing this element- Returns:
- a new
SwingComponentinstance
-
getOptionPane
public SwingOptionPane getOptionPane()
- Returns:
- a new
SwingOptionPaneinstance
-
getFileBrowse
public SwingFileBrowse getFileBrowse()
- Returns:
- a new
SwingFileBrowseinstance
-
getCheckBox
public SwingCheckBox getCheckBox(String mapId)
- Parameters:
mapId- the element's map id- Returns:
- a new
SwingCheckBoxinstance
-
getCheckBox
public SwingCheckBox getCheckBox(UiElementProperties properties)
- Parameters:
properties- properties describing this element- Returns:
- a new
SwingCheckBoxinstance
-
getToggleButton
public SwingToggleButton getToggleButton(String mapId)
- Parameters:
mapId- the element's map id- Returns:
- a new
SwingToggleButtoninstance
-
getToggleButton
public SwingToggleButton getToggleButton(UiElementProperties properties)
- Parameters:
properties- properties describing this element- Returns:
- a new
SwingToggleButtoninstance
-
getRadioButton
public SwingRadioButton getRadioButton(String mapId)
- Parameters:
mapId- the element's map id- Returns:
- a new
SwingRadioButtoninstance
-
getRadioButton
public SwingRadioButton getRadioButton(UiElementProperties properties)
- Parameters:
properties- properties describing this element- Returns:
- a new
SwingRadioButtoninstance
-
getTable
public SwingTable getTable(String mapId)
- Parameters:
mapId- the element's map id- Returns:
- a new
SwingTableinstance
-
getTable
public SwingTable getTable(UiElementProperties properties)
- Parameters:
properties- properties describing this element- Returns:
- a new
SwingTableinstance
-
getLabel
public SwingLabel getLabel(String mapId)
- Parameters:
mapId- the element's map id- Returns:
- a new
SwingLabelinstance
-
getLabel
public SwingLabel getLabel(UiElementProperties properties)
- Parameters:
properties- properties describing this element- Returns:
- a new
SwingLabelinstance
-
getSpinner
public SwingSpinner getSpinner(String mapId)
- Parameters:
mapId- the element's map id- Returns:
- a new
SwingSpinnerinstance
-
getSpinner
public SwingSpinner getSpinner(UiElementProperties properties)
- Parameters:
properties- properties describing this element- Returns:
- a new
SwingSpinnerinstance
-
getTabbedPane
public SwingTabbedPane getTabbedPane(String mapId)
- Parameters:
mapId- the element's map id- Returns:
- a new
SwingTabbedPaneinstance
-
getTabbedPane
public SwingTabbedPane getTabbedPane(UiElementProperties properties)
- Parameters:
properties- properties describing this element- Returns:
- a new
SwingTabbedPaneinstance
-
goToMainWindow
public void goToMainWindow()
Set current window to work with.- Throws:
ElementNotFoundException- if the frame/dialog is not found or several are found with such title
-
goToWindow
public void goToWindow(String windowTitle, boolean isDialog) throws ElementNotFoundException
Set current window to work with. Window can be frame or dialog.- Parameters:
windowTitle- the window titleisDialog- if the window is dialog or not( i.e. frame)- Throws:
ElementNotFoundException- if the frame/dialog is not found
-
goToWindow
public void goToWindow(String windowTitle, boolean isDialog, int timeout) throws ElementNotFoundException
Set current window to work with. Window can be frame or dialog.- Parameters:
windowTitle- the window titleisDialog- if the window is dialog or not( i.e. frame)timeout- maximum time to wait for the window to appear. Measured in milliseconds- Throws:
ElementNotFoundException- if the frame/dialog is not found
-
goToContainer
public void goToContainer(UiElementProperties containerProperties)
Set active container under the current window- Parameters:
containerProperties-UiElementPropertieswhich contains the container 'name' or 'title' property- Throws:
ElementNotFoundException- if the container element is not found
-
goToContainer
public void goToContainer(String containerMapId)
Set active container under the current window- Parameters:
containerMapId- container element mapId. The element requires 'name' or 'title' property.- Throws:
ElementNotFoundException- if the container element is not found
-
goToMainContainer
public void goToMainContainer()
Sets active container to the current window, i.e. goes to top of current window.
-
getComponentHierarchy
public String getComponentHierarchy()
- Returns:
- current container component hierarchy as
String
-
useComponentInspector
public void useComponentInspector()
Whether to use component inspector tool, which logs the selected component type, its available properties and calculates its index in the component hierarchy tree in the scope of the current container.
The tool works with mouse click action only.
-
-