File tree 1 file changed +6
-0
lines changed
src/main/java/javafxlibrary/utils
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 29
29
import javafx .stage .Window ;
30
30
import javafxlibrary .exceptions .JavaFXLibraryNonFatalException ;
31
31
import javafxlibrary .exceptions .JavaFXLibraryTimeoutException ;
32
+ import javafxlibrary .keywords .AdditionalKeywords .ConvenienceKeywords ;
32
33
import javafxlibrary .matchers .ProgressBarMatchers ;
33
34
import javafxlibrary .utils .finder .Finder ;
34
35
import org .apache .commons .lang3 .StringUtils ;
@@ -425,6 +426,7 @@ public static void checkClickLocation(int x, int y) {
425
426
public static void checkClickLocation (Object object ) {
426
427
427
428
RobotLog .trace ("Checking if target \" " + object .toString () + "\" is within active window" );
429
+ verifyClickLocationOnFront (object );
428
430
429
431
if (safeClicking ) {
430
432
@@ -438,6 +440,10 @@ public static void checkClickLocation(Object object) {
438
440
}
439
441
RobotLog .trace ("Target location checks out OK, it is within active window" );
440
442
}
443
+
444
+ public static void verifyClickLocationOnFront (Object object ) {
445
+ new ConvenienceKeywords ().bringStageToFront ((Stage ) objectToNode (object ).getScene ().getWindow ());
446
+ }
441
447
442
448
public static Object checkClickTarget (Object target ) {
443
449
try {
You can’t perform that action at this time.
0 commit comments