Package jp.vmi.selenium.selenese.result

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


    @Override
    protected Result executeImpl(Context context, String... curArgs) {
        if (!context.isTrue(curArgs[ARG_CONDITION])) {
            resetReachedCount();
            context.getCommandListIterator().jumpToNextOf(endLoop);
            return new Success("Break");
        } else {
            return new Success("Continue");
        }
    }
View Full Code Here


            String resultString = SeleniumUtils.convertToString(subCommand.execute(context, curArgs));
            if (andWait) {
                int timeout = context.getTimeout();
                context.getSubCommandMap().get(WAIT_FOR_PAGE_TO_LOAD).execute(context, Integer.toString(timeout));
            }
            return StringUtils.isNotEmpty(resultString) ? new Success(resultString) : SUCCESS;
        } catch (SeleniumException e) {
            return new Failure(e.getMessage().replaceAll("(\r?\n)+", " / "));
        }
    }
View Full Code Here

            String resultString = SeleniumUtils.convertToString(subCommand.execute(context, curArgs));
            if (andWait) {
                int timeout = context.getTimeout();
                context.getSubCommandMap().get(WAIT_FOR_PAGE_TO_LOAD).execute(context, Integer.toString(timeout));
            }
            return StringUtils.isNotEmpty(resultString) ? new Success(resultString) : SUCCESS;
        } catch (SeleniumException e) {
            return new Failure(e.getMessage().replaceAll("(\r?\n)+", " / "));
        }
    }
View Full Code Here

    protected Result executeImpl(Context context, String... curArgs) {
        int argLen = getterSubCommand.getArgumentTypes().length;
        String varName = curArgs[argLen];
        Object result = getterSubCommand.execute(context, Arrays.copyOf(curArgs, argLen));
        context.getVarsMap().put(varName, result);
        return new Success(SeleniumUtils.convertToString(result));
    }
View Full Code Here

    }

    @Override
    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) {
        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

        if (rollupRule == null)
            return new Error("No such rollup rule: " + rollupName);
        CommandList commandList = rollupRule.getExpandedCommands(context, kwArgsMap);
        commandList.setLogIndentLevel(context.getCommandListIterator().getLogIndentLevel() + 1);
        Result result = commandList.execute(context);
        return result == SUCCESS ? new Success("Success: " + rollupRule.getName()) : result;
    }
View Full Code Here

        if (rollupRule == null)
            return new Error("No such rollup rule: " + rollupName);
        CommandList commandList = rollupRule.getExpandedCommands(context, kwArgsMap);
        commandList.setLogIndentLevel(context.getCommandListIterator().getLogIndentLevel() + 1);
        Result result = commandList.execute(context);
        return result == SUCCESS ? new Success("Success: " + rollupRule.getName()) : result;
    }
View Full Code Here

        return false;
    }

    @Override
    protected Result executeImpl(Context context, String... curArgs) {
        return new Success(curArgs[ARG_MESSAGE]);
    }
View Full Code Here

    protected Result executeImpl(Context context, String... curArgs) {
        String value = context.getCollectionMap().pollFromCollection(curArgs[ARG_COLLECTION_NAME]);
        if (value == null) {
            resetReachedCount();
            context.getCommandListIterator().jumpToNextOf(endLoop);
            return new Success("Break");
        } else {
            context.getVarsMap().put(curArgs[ARG_VAR_NAME], value);
            return new Success("Continue");
        }
    }
View Full Code Here

TOP

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

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.