Class SwingComponent
- java.lang.Object
-
- com.axway.ats.uiengine.elements.UiElement
-
- com.axway.ats.uiengine.elements.swing.SwingComponent
-
public class SwingComponent extends UiElement
Provide generic access to AWT/Swing components
Using this class is recommended only when other similar classes in this package do not provide suitable methods.Can be identified by:
- name and class
- label
- label and class
- text
- text and class
-
-
Field Summary
-
Fields inherited from class com.axway.ats.uiengine.elements.UiElement
log, properties
-
-
Constructor Summary
Constructors Constructor Description SwingComponent(UiDriver uiDriver, UiElementProperties properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclick()Simulates a user click over the GUI component.voiddoubleClick()Simulates a user double click over the GUI component.voiddrag()Simulates a user dragging of this componentvoiddrop()Simulates a user dropping to this componentvoidfocus()Focusing the GUI component.ComponentgetNativeComponent()Generic way to find and AWT/Swing component.
Not recommended for wide use.voidmiddleClick()Simulates a user middle click over the GUI component.voidrightClick()Simulates a user right click over the GUI component.-
Methods inherited from class com.axway.ats.uiengine.elements.UiElement
checkTypeAndRules, getElementProperties, getElementProperty, getPropertyNamesToUseForMatch, getUiDriver, logAction, toString
-
-
-
-
Constructor Detail
-
SwingComponent
public SwingComponent(UiDriver uiDriver, UiElementProperties properties)
-
-
Method Detail
-
getNativeComponent
public Component getNativeComponent()
Generic way to find and AWT/Swing component.
Not recommended for wide use. It might be used in case when the component is very custom and does not extend Swing component with similar behavior.- Returns:
- instance of the found
Component
-
click
public void click()
Simulates a user click over the GUI component.
-
doubleClick
public void doubleClick()
Simulates a user double click over the GUI component.
-
rightClick
public void rightClick()
Simulates a user right click over the GUI component.
-
middleClick
public void middleClick()
Simulates a user middle click over the GUI component.
-
focus
public void focus()
Focusing the GUI component.
-
drag
public void drag()
Simulates a user dragging of this component
-
drop
public void drop()
Simulates a user dropping to this component
-
-