Package jp.vmi.selenium.selenese.log

Examples of jp.vmi.selenium.selenese.log.PageInformation


public class CommandLogInterceptor implements MethodInterceptor {

    private static final Logger log = LoggerFactory.getLogger(CommandLogInterceptor.class);

    private void logResult(LogRecorder clr, String indent, String cmdStr, Result result, Context context) {
        PageInformation prevInfo = context.getLatestPageInformation();
        PageInformation info = new PageInformation(context);
        CookieFilter cookieFilter = context.getCookieFilter();
        String prefix = indent + "- Cookie: ";
        if (result.isFailed()) {
            String resStr = info.getFirstMessage(prevInfo, indent, cmdStr, "=>", result.toString());
            log.error(resStr);
            clr.error(resStr);
            for (String message : info.cookieMap.allMessages(cookieFilter)) {
                log.error(prefix + message);
                clr.error(prefix + message);
            }
        } else {
            String resStr = info.getFirstMessage(prevInfo, indent, "-", result.toString());
            log.info(resStr);
            clr.info(resStr);
            List<String> messages;
            if (info.isSameOrigin(prevInfo))
                messages = info.cookieMap.diffMessages(cookieFilter, prevInfo.cookieMap);
            else
                messages = info.cookieMap.allMessages(cookieFilter);
            for (String message : messages) {
                log.info(prefix + message);
View Full Code Here

TOP

Related Classes of jp.vmi.selenium.selenese.log.PageInformation

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.