项目中使用截图和邮件的方法

try{

xxxxxxxxxxxxxxxxxx

 } catch (Exception e) {
            if (FlagEnum.MAIL_FLAG.getFlag()) {
                String tpath = "D:/screen/" + PubModule.screenshot(driver) + ".png";
                Mail.sendEmailAttach(ConstantEnum.ERROR_MESSAGE.getValue() + "xxxxxx", e.getLocalizedMessage().replaceAll("\\s*", ""), tpath);
            } else {
                e.printStackTrace();
            }
        }

posted @ 2017-11-24 10:40  "花田李氏  阅读(115)  评论(0编辑  收藏  举报