Class SmartCucumberApiScenarioContext
- java.lang.Object
-
- org.uitnet.testing.smartfwk.SmartCucumberScenarioContext
-
- org.uitnet.testing.smartfwk.api.core.defaults.SmartCucumberApiScenarioContext
-
public class SmartCucumberApiScenarioContext extends SmartCucumberScenarioContext
This class is used as cucumber scenario context to keep the information for the running scenario. using this class we can pass the information from one scenario to another scenario. This class must be injected in the cucumber step definition constructor. After that any step definition as part of one scenario can access the information from this class. NOTE: We must have cucumber-picocontainer jar dependency in our Maven or gradle build configuration (as part of cucumber documentation).- Author:
- Madhav Krishna
-
-
Field Summary
-
Fields inherited from class org.uitnet.testing.smartfwk.SmartCucumberScenarioContext
activeAppName, params, scenario
-
-
Constructor Summary
Constructors Constructor Description SmartCucumberApiScenarioContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringapplyParamsValueOnText(String text)It will apply all params value to the text.voidclose()AbstractApiActionHandlergetActionHandler(String appName, String targetServerName)AbstractApiActionHandlergetActiveActionHandler()ApiConfiggetActiveAppApiConfig()StringgetActiveUserProfileNameOfActiveActionHandler()AbstractApiActionHandlerlogin(String appName, String targetServerName, String userProfileName)AbstractApiActionHandlersetActiveUserProfile(String appName, String targetServerName, String userProfileName)AbstractApiActionHandlersetActiveUserProfileOnActiveAppAndTargetServer(String userProfileName)AbstractApiActionHandlerswitchTargetServer(String appName, String targetServerName, String userProfileName)-
Methods inherited from class org.uitnet.testing.smartfwk.SmartCucumberScenarioContext
addParamValue, getActiveAppConfig, getActiveAppName, getAllParams, getAppConfig, getEntriesForParamsEndsWithText, getEntriesForParamsStartsWithText, getMultiValueParamValueAsString, getParamValue, getParamValueAsBoolean, getParamValueAsDouble, getParamValueAsInteger, getParamValueAsLong, getParamValueAsString, getParamValueNullAsParamName, getScenario, getTestConfigManager, log, removeParam, setScenario
-
-
-
-
Method Detail
-
getActionHandler
public AbstractApiActionHandler getActionHandler(String appName, String targetServerName)
-
switchTargetServer
public AbstractApiActionHandler switchTargetServer(String appName, String targetServerName, String userProfileName)
-
login
public AbstractApiActionHandler login(String appName, String targetServerName, String userProfileName)
-
setActiveUserProfile
public AbstractApiActionHandler setActiveUserProfile(String appName, String targetServerName, String userProfileName)
-
setActiveUserProfileOnActiveAppAndTargetServer
public AbstractApiActionHandler setActiveUserProfileOnActiveAppAndTargetServer(String userProfileName)
-
getActiveActionHandler
public AbstractApiActionHandler getActiveActionHandler()
-
getActiveUserProfileNameOfActiveActionHandler
public String getActiveUserProfileNameOfActiveActionHandler()
-
getActiveAppApiConfig
public ApiConfig getActiveAppApiConfig()
-
close
public void close()
- Overrides:
closein classSmartCucumberScenarioContext
-
applyParamsValueOnText
public String applyParamsValueOnText(String text)
It will apply all params value to the text. It will convert param value to string then apply.- Overrides:
applyParamsValueOnTextin classSmartCucumberScenarioContext- Parameters:
text-- Returns:
-
-