Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2013-2014 SmartBear Software
* Copyright 2014-2015 The TestFX Contributors
*
* Licensed under the EUPL, Version 1.1 or - as soon they will be approved by the
* European Commission - subsequent versions of the EUPL (the "Licence"); You may
* not use this work except in compliance with the Licence.
*
* You may obtain a copy of the Licence at:
* http://ec.europa.eu/idabc/eupl
*
* Unless required by applicable law or agreed to in writing, software distributed
* under the Licence is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the Licence for the
* specific language governing permissions and limitations under the Licence.
*/
package org.loadui.testfx;
import java.awt.GraphicsEnvironment;
import java.io.File;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Date;
import java.util.List;
import java.util.Set;
import java.util.concurrent.Callable;
import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.image.Image;
import javafx.stage.Screen;
import javafx.stage.Stage;
import javafx.stage.Window;
import com.google.common.base.Predicate;
import org.hamcrest.Matcher;
import org.junit.Before;
import org.junit.BeforeClass;
import org.loadui.testfx.exceptions.NoNodesFoundException;
import org.loadui.testfx.exceptions.NoNodesVisibleException;
import org.loadui.testfx.exceptions.NodeQueryException;
import org.testfx.api.FxRobot;
import org.testfx.api.FxToolkit;
import org.testfx.service.finder.NodeFinder;
import org.testfx.service.finder.NodeFinderException;
import org.testfx.service.finder.WindowFinder;
import org.testfx.service.support.CaptureSupport;
import org.testfx.service.support.WaitUntilSupport;
import org.testfx.util.WaitForAsyncUtils;
import static org.junit.Assume.assumeFalse;
import static org.testfx.api.FxService.serviceContext;
public abstract class GuiTest extends FxRobot {
//---------------------------------------------------------------------------------------------
// STATIC METHODS.
//---------------------------------------------------------------------------------------------
public static T _targetWindow(T window) {
windowFinder.targetWindow(window);
return window;
}
public static List getWindows() {
return windowFinder.listTargetWindows();
}
public static Window getWindowByIndex(int windowIndex) {
return windowFinder.window(windowIndex);
}
public static Stage findStageByTitle(String stageTitleRegex) {
return (Stage) windowFinder.window(stageTitleRegex);
}
public static T find(String query) {
try {
return nodeFinder.lookup(query).query();
}
catch (NodeFinderException exception) {
throw buildNodeQueryException(exception);
}
}
public static Set findAll(String query) {
try {
return nodeFinder.lookup(query).queryAll();
}
catch (NodeFinderException exception) {
throw buildNodeQueryException(exception);
}
}
public static T find(Predicate predicate) {
try {
return nodeFinder.lookup(predicate).query();
}
catch (NodeFinderException exception) {
throw buildNodeQueryException(exception);
}
}
public static T find(Matcher