public class JavaWindow extends Object implements Serializable
| Constructor and Description |
|---|
JavaWindow(String titleAsRegularExpression) |
JavaWindow(String titleAsRegularExpression,
String name) |
JavaWindow(Window window) |
JavaWindow(Window window,
String name) |
| Modifier and Type | Method and Description |
|---|---|
static List<Component> |
getAllComponents(Container c) |
List<Component> |
getComponents() |
ArrayList<JavaGuiElement> |
getComponentsAsJavaGuiElements()
Collects all sub element of the window and tries converting them to JavaGuiElements and returning that list.
|
int |
getElementMatchCount(JavaGuiElement javaGuiElement) |
List<Object> |
getMatchingComponents(JavaGuiElement javaGuiElement) |
String |
getName() |
String |
getTitle()
Returns the runtime title of this window.
|
Object |
getWindow()
Identifies and returns the runtime interaction object of this window.
|
boolean |
isRenderingCompleted() |
boolean |
isShown() |
void |
mapWindowToDescriptionClass(String outputFile)
Tries to create element descriptions for the elements in the window, to be used in automation.
|
void |
printIdentifiedComponents()
Prints the currently identified components to standard out.
|
List<String> |
textsInComponents()
Goes through all identified elements in the GUI and collects the displayed text in these.
|
Object |
waitForWindowToAppear(int timeoutInSeconds)
Halts execution while waiting for this window to become visible.
|
public JavaWindow(String titleAsRegularExpression)
public JavaWindow(Window window)
public String getName()
public Object waitForWindowToAppear(int timeoutInSeconds)
timeoutInSeconds - Timeout period to wait, stated in seconds.public String getTitle()
public boolean isRenderingCompleted()
public Object getWindow()
public ArrayList<JavaGuiElement> getComponentsAsJavaGuiElements()
public void printIdentifiedComponents()
public List<String> textsInComponents()
public void mapWindowToDescriptionClass(String outputFile)
outputFile - The file to write the window element descriptors to.public int getElementMatchCount(JavaGuiElement javaGuiElement)
public List<Object> getMatchingComponents(JavaGuiElement javaGuiElement)
public boolean isShown()
Copyright © 2019. All rights reserved.