Skip to content

add negative checking keywords, fixes #18 #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,23 @@ public void clearObjectMap() {


@RobotKeyword("Returns the class name of currently active JavaFX Application")
public String getCurrentApplication() {
try {
return getCurrentSessionApplicationName();
} catch (Exception e) {
throw new JavaFXLibraryNonFatalException("Problem getting current application name.", e);
}
}

@Deprecated
@RobotKeyword("*DEPRECATED in version 0.6.0!* Use `Get Current Application` keyword instead.\n\n"
+ "Returns the class name of currently active JavaFX Application\n")
public String currentApplication() {
try {
return getCurrentSessionApplicationName();
} catch (Exception e) {
throw new JavaFXLibraryNonFatalException("Problem getting current application name.", e);
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
public class ConvenienceKeywords extends TestFxAdapter {

@Deprecated
@RobotKeyword("*DEPRECATED!!* Use keyword `Find` instead.\n\n" +
@RobotKeyword("*DEPRECATED in version 0.6.0!* Use keyword `Find` instead.\n\n" +
"finder that mimics _xpath_ style search.\n\n"
+ "``query`` is a query locator, see `3.1 Using queries`.\n\n"
+ "``failIfNotFound`` specifies if keyword should fail if nothing is found. By default it's false and "
Expand Down Expand Up @@ -139,7 +139,7 @@ public void callObjectMethodInFxApplicationThread(Object object, String method,
}

@Deprecated
@RobotKeyword("*DEPRECATED!!* Use keyword `Find` instead.\n\n"
@RobotKeyword("*DEPRECATED in version 0.6.0!* Use keyword `Find` instead.\n\n"
+ "Returns the *first* node matching the query. \n\n"
+ "``query`` is the Class name String to use in lookup.\n"
+ "\nExample:\n"
Expand All @@ -157,7 +157,7 @@ public Object findClass(final String query) {
}

@Deprecated
@RobotKeyword("*DEPRECATED!!* Use keyword `Find All` instead.\n\n"
@RobotKeyword("*DEPRECATED in version 0.6.0!* Use keyword `Find All` instead.\n\n"
+ "Returns *all* descendant nodes of given node matching the query. \n\n"
+ "``node`` is the starting point Object:Node from where to start looking, see `3.2 Using objects`. \n\n"
+ "``query`` is a query locator, see `3.1 Using queries`.\n\n"
Expand Down Expand Up @@ -196,7 +196,7 @@ public List<Object> findAllFromNode(Object node, String query) {
}

@Deprecated
@RobotKeyword("*DEPRECATED!!* Use keyword `Find All` instead.\n\n"
@RobotKeyword("*DEPRECATED in version 0.6.0!* Use keyword `Find All` instead.\n\n"
+ "Returns *all* nodes matching query AND given pseudo-class state. \r\n"
+ "``query`` is a query locator, see `3.1 Using queries`.\n\n"
+ "``pseudo`` is a String value specifying pseudo class value.\n\n"
Expand Down Expand Up @@ -235,7 +235,7 @@ public List<Object> findAllWithPseudoClass(String query, String pseudo) {
}

@Deprecated
@RobotKeyword("*DEPRECATED!!* Use keyword `Find` instead.\n\n"
@RobotKeyword("*DEPRECATED in version 0.6.0!* Use keyword `Find` instead.\n\n"
+ "Returns the *first* descendant node of given node matching the query. \n\n"
+ "``node`` is the starting point Object:Node from where to start looking, see `3.2 Using objects`. \n\n"
+ "``query`` is a query locator, see `3.1 Using queries`.\n\n"
Expand Down Expand Up @@ -437,7 +437,7 @@ public Set<PseudoClass> getPseudoClassStates(Object locator) {

// TODO: Should this be deleted? Find All From Node has the same functionality
@Deprecated
@RobotKeyword("*DEPRECATED!!* Use keyword `Find` instead.\n\n"
@RobotKeyword("*DEPRECATED in version 0.6.0!* Use keyword `Find` instead.\n\n"
+ "Returns *all* descendant nodes of given node matching the given Java class name. \n\n"
+ "``locator`` is either a _query_ or _Object_ for node whose children will be queried, see "
+ "`3.2 Using locators as keyword arguments`. \n\n"
Expand Down Expand Up @@ -488,7 +488,7 @@ public String getNodeText(Object locator) {
}

@Deprecated
@RobotKeyword("*DEPRECATED!!* Use keyword `Find` instead.\n\n"
@RobotKeyword("*DEPRECATED in version 0.6.0!* Use keyword `Find` instead.\n\n"
+ "Returns height value of the node. \n\n"
+ "``locator`` is either a _query_ or _Object_ for a node whose getHeight method will be called, see "
+ "`3. Locating or specifying UI elements`. \n\n")
Expand Down Expand Up @@ -582,7 +582,7 @@ public String getObjectClassName(Object locator) {
}

@Deprecated
@RobotKeyword("*DEPRECATED!!* Use keyword `Get Scene` instead.\n\n"
@RobotKeyword("*DEPRECATED in version 0.6.0!* Use keyword `Get Scene` instead.\n\n"
+"Returns given locators Scene object. \n\n"
+ "``locator`` is either a _query_ or a _Node_, see `3.2 Using locators as keyword arguments`\n\n")
@ArgumentNames({ "locator" })
Expand Down Expand Up @@ -661,7 +661,7 @@ public Object getPrimaryScreenBounds() {

@RobotKeyword("Returns the library version from POM file")
public String getLibraryVersion() {
return HelperFunctions.loadRobotLibraryVersion();
return HelperFunctions.getVersion();
}

@RobotKeyword("Returns the value of cell in the given location\n\n"
Expand Down
Loading