From 8a7d971b0e2e1d182c9e055686cca66458501cb0 Mon Sep 17 00:00:00 2001 From: seagull <24163551@qq.com> Date: Fri, 6 Dec 2019 14:55:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=AD=A5=E9=AA=A4=E5=8A=A8?= =?UTF-8?q?=E4=BD=9C=E4=B8=AD=E7=9A=84#=E5=88=86=E9=9A=94=E7=AC=A6?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../execution/dispose/ActionManageForSteps.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main/java/luckyclient/execution/dispose/ActionManageForSteps.java b/src/main/java/luckyclient/execution/dispose/ActionManageForSteps.java index 1a57686..4154a2a 100644 --- a/src/main/java/luckyclient/execution/dispose/ActionManageForSteps.java +++ b/src/main/java/luckyclient/execution/dispose/ActionManageForSteps.java @@ -1,7 +1,6 @@ package luckyclient.execution.dispose; -import org.apache.commons.lang.StringUtils; - +import cn.hutool.core.util.StrUtil; import luckyclient.utils.Constants; import luckyclient.utils.LogUtil; @@ -66,10 +65,14 @@ public class ActionManageForSteps { */ private static String actionExecute(String actionKeyWord,String testResult){ try{ + String keyWord = ""; + String actionParams = ""; + if(actionKeyWord.contains("#")){ + keyWord = actionKeyWord.substring(actionKeyWord.lastIndexOf("#")+1, actionKeyWord.length()); + actionParams = actionKeyWord.substring(0, actionKeyWord.lastIndexOf("#")); + } - String keyWord = actionKeyWord.substring(actionKeyWord.lastIndexOf("#")+1, actionKeyWord.length()); - String actionParams = actionKeyWord.substring(0, actionKeyWord.lastIndexOf("#")); - if(StringUtils.isNotEmpty(keyWord)&& keyWord.length()>0){ + if(StrUtil.isNotEmpty(keyWord)&& keyWord.length()>0){ ActionContext actionContext = new ActionContext(keyWord.toLowerCase()); testResult = actionContext.parse(actionParams, testResult, actionKeyWord); }else {