Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 435287c

Browse files
committed
fixed object matching with multiline text elements
1 parent a57f858 commit 435287c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/javafxlibrary/utils/HelperFunctions.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public static Node waitUntilExists(String target, int timeout, String timeUnit)
9090
+ timeout + " " + timeUnit);
9191
} catch (Exception e) {
9292
RobotLog.trace("Exception in waitUntilExists: " + e + "\n" + e.getCause().toString());
93-
throw new JavaFXLibraryNonFatalException("waitUntilExist failed: " + e);
93+
throw new JavaFXLibraryNonFatalException("waitUntilExist failed: ", e);
9494
}
9595
}
9696

@@ -150,7 +150,7 @@ public static Object mapObject(Object object) {
150150
if (object != null) {
151151
if (isCompatible(object))
152152
return object;
153-
String key = object.hashCode() + object.toString();
153+
String key = (object.hashCode() + object.toString()).replaceAll("\r", "").replaceAll("\n", "");
154154
objectMap.put(key, object);
155155
return key;
156156
}

0 commit comments

Comments
 (0)