Package jp.vmi.selenium.selenese.result

Examples of jp.vmi.selenium.selenese.result.Warning


    @Override
    protected Result executeImpl(Context context, String... curArgs) {
        String speed = curArgs[ARG_SPEED];
        if (StringUtils.isBlank(speed))
            return new Warning("the argument of setSpeed is ignored: empty.");
        try {
            context.setSpeed(Long.parseLong(speed));
            return SUCCESS;
        } catch (NumberFormatException e) {
            return new Warning("the argument of setSpeed is ignored: invalid number format: " + speed);
        }
    }
View Full Code Here


    protected Result executeImpl(Context context, String... curArgs) {
        if (!(context instanceof ScreenshotHandler))
            return new Success("captureEntirePageScreenshot is not supported.");
        String filename = curArgs[ARG_FILENAME];
        if (StringUtils.isBlank(filename))
            return new Warning("captureEntirePageScreenshot is ignored: empty filename.");
        ScreenshotHandler handler = (ScreenshotHandler) context;
        if (handler.isIgnoredScreenshotCommand())
            return new Success("captureEntirePageScreenshot is ignored.");
        try {
            addScreenshot(handler.takeScreenshot(filename), "cmd");
            return SUCCESS;
        } catch (UnsupportedOperationException e) {
            return new Warning(e.getMessage());
        }
    }
View Full Code Here

    @Override
    protected Result executeImpl(Context context, String... curArgs) {
        String timeout = curArgs[ARG_TIMEOUT];
        if (StringUtils.isBlank(timeout))
            return new Warning("the argument of setTimeout is ignored: empty.");
        try {
            context.setTimeout(Integer.parseInt(timeout));
            return SUCCESS;
        } catch (NumberFormatException e) {
            return new Warning("the argument of setTimeout is ignored: invalid number format: " + timeout);
        }
    }
View Full Code Here

        }
        switch (type) {
        case ASSERT:
            return new Failure(message);
        case VERIFY:
            return found ? new Warning(message) : new Failure(message);
        default: // == WAIT_FOR
            return new Warning(String.format("Timed out after %dms (%s)", timeout, message));
        }
    }
View Full Code Here

    @Override
    protected Result executeImpl(Context context, String... curArgs) {
        String pauseMSec = curArgs[ARG_PAUSE_MSEC];
        if (StringUtils.isBlank(pauseMSec))
            return new Warning("pause is ignored: empty time.");
        try {
            Thread.sleep(Long.parseLong(pauseMSec));
            return SUCCESS;
        } catch (NumberFormatException e) {
            return new Warning("pause is ignored: invalid time: " + pauseMSec);
        } catch (InterruptedException e) {
            return new Failure(e);
        }
    }
View Full Code Here

TOP

Related Classes of jp.vmi.selenium.selenese.result.Warning

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.