public class Context extends Object
Modifier | Constructor and Description |
---|---|
protected |
Context()
Private constructor
|
Modifier and Type | Method and Description |
---|---|
static void |
addFailure() |
static void |
addWarning() |
static void |
addWindow(String key,
String windowHandle) |
static void |
clear()
Clear context
|
static void |
emptyScenarioRegistry() |
static Application |
getApplication(String applicationKey) |
static String |
getApplicationByPagekey(String pageKey)
Get application name in a string by page key.
|
static String |
getBrowser() |
static Callbacks.Callback |
getCallBack(String key) |
static int |
getConnectTimeout() |
static String |
getCryptoKey() |
static Map<String,Method> |
getCucumberMethods() |
static io.cucumber.core.api.Scenario |
getCurrentScenario() |
static int |
getCurrentScenarioData() |
static int |
getCurrentStepIndex() |
static int |
getCurrentSubStepIndex() |
static DataInputProvider |
getDataInputProvider() |
static DataOutputProvider |
getDataOutputProvider() |
static org.openqa.selenium.WebDriver |
getDriver()
Get the selenium driver from the driver factory.
|
static Context |
getInstance()
Get context singleton.
|
static String |
getLang() |
static Locale |
getLocale() |
static String |
getMainWindow() |
static String |
getModelPackages() |
static int |
getNbFailure() |
static int |
getNbWarning() |
static String |
getPropertie(String key) |
static String |
getProperty(String key,
Properties propertyFile) |
static org.openqa.selenium.Proxy |
getProxy() |
static int |
getReadTimeout() |
static String |
getResourcesPath() |
static String |
getScenarioName() |
static String |
getScenarioProperty(String key) |
static String |
getSelectorsVersion() |
static org.joda.time.DateTime |
getStartCurrentScenario() |
static int |
getTimeout() |
static String |
getUrlByPagekey(String pageKey)
Get url name in a string by page key.
|
static String |
getValue(String key) |
static String |
getWebdriversProperties(String key) |
static String |
getWindow(String key) |
static Map<String,String> |
getWindows() |
static int |
getWriteTimeout() |
static void |
goToNextData() |
static void |
goToNextFeature() |
static void |
goToNextStep() |
protected static void |
initApplicationDom(ClassLoader loader,
String version,
String applicationKey) |
void |
initializeEnv(String propertiesFileName) |
void |
initializeRobot(Class<?> clazz) |
static void |
initializeScenarioProperties(ClassLoader loader) |
static void |
initializeWebdriversProperties(ClassLoader loader) |
protected static Properties |
initPropertiesFile(ClassLoader loader,
String propertiesFileName) |
static boolean |
isHeadless() |
static boolean |
isStackTraceDisplayed() |
static void |
quit()
Clear context
|
static void |
removeWindow(String key) |
static void |
saveValue(String key,
String value) |
static boolean |
scenarioHasWarning() |
static void |
scenarioHasWarning(boolean warning) |
static void |
setCurrentScenario(io.cucumber.core.api.Scenario scenario) |
static void |
setCurrentScenarioData(int current) |
static void |
setCurrentSubStepIndex(int index) |
static void |
setDataInputProvider(DataInputProvider dataInputProvider) |
static void |
setDataOutputProvider(DataOutputProvider dataOutputProvider) |
static void |
setMainWindow(String window) |
static void |
setNbFailure(int nbFailure) |
static void |
setNbWarning(int nbWarning) |
static void |
setScenarioName(String scenarioName) |
static void |
startCurrentScenario() |
protected Statistics |
statisticsProcessor(ClassLoader loader,
String packageName)
statisticsProcessor retrieves specific information from the robot to return it to users statistic feature.
|
public static final String STEPS_BROWSER_STEPS_CLASS_QUALIFIED_NAME
public static final String GO_TO_URL_METHOD_NAME
BrowserSteps.GO_TO_URL_METHOD_NAME
public static final String RESTART_WEB_DRIVER_METHOD_NAME
BrowserSteps.RESTART_WEB_DRIVER_METHOD_NAME
public static final String HTTP_PROXY
public static final String HTTPS_PROXY
public static final String NO_PROXY
public static final String OKHTTP_CONNECT_TIMEOUT
public static final String OKHTTP_WRITE_TIMEOUT
public static final String OKHTTP_READ_TIMEOUT
public static final String HEADLESS
public static final String LOCALE
public static final String AUTH_TYPE
public static final String CRYPTO_KEY
public static final String DISPLAY_STACK_TRACE
public static final String TIMEOUT_KEY
public static final String BROWSER_KEY
public static final String LANG_KEY
public static final String MODEL_PACKAGES
public static final String SELECTORS_VERSION
protected StatisticsService statistics
public static final String BAKERY_KEY
public static final String BAKERY_HOME
public static final String BAKERY_ADMIN
public static final String BAKERY_REF
public static final String BAKERY_DEMO
public static final String GITHUBAPI_KEY
public static final String GITHUBAPI_HOME
protected static volatile Context instance
protected String selectorsVersion
protected Callbacks exceptionCallbacks
protected Map<String,Application> applications
protected String resourcesPath
protected Properties applicationProperties
public static Context getInstance()
public void initializeEnv(String propertiesFileName)
propertiesFileName
- is name of properties file.public void initializeRobot(Class<?> clazz) throws TechnicalException
clazz
- used to find class loader.TechnicalException
- is thrown if you have a technical error (format, configuration, datas, ...) in NoraUi.public static void clear()
public static void quit()
public static org.openqa.selenium.WebDriver getDriver()
public static void removeWindow(String key)
public static void setMainWindow(String window)
public static String getMainWindow()
public static void emptyScenarioRegistry()
public static void goToNextData()
public static void goToNextStep()
public static void addFailure()
public static void addWarning()
public static int getCurrentScenarioData()
public static int getCurrentStepIndex()
public static int getCurrentSubStepIndex()
public static void setCurrentSubStepIndex(int index)
public static int getNbFailure()
public static int getNbWarning()
public static void setNbFailure(int nbFailure)
public static void setNbWarning(int nbWarning)
public static void scenarioHasWarning(boolean warning)
public static boolean scenarioHasWarning()
public static void setCurrentScenarioData(int current)
public static void goToNextFeature()
public static String getScenarioName()
public static void setScenarioName(String scenarioName)
scenarioName
- name of scenario as a string.public static io.cucumber.core.api.Scenario getCurrentScenario()
public static void setCurrentScenario(io.cucumber.core.api.Scenario scenario)
public static org.joda.time.DateTime getStartCurrentScenario()
public static void startCurrentScenario()
public static DataInputProvider getDataInputProvider()
public static void setDataInputProvider(DataInputProvider dataInputProvider)
public static DataOutputProvider getDataOutputProvider()
public static void setDataOutputProvider(DataOutputProvider dataOutputProvider)
protected static Properties initPropertiesFile(ClassLoader loader, String propertiesFileName)
loader
- is class loader.propertiesFileName
- is name of properties file.public static String getProperty(String key, Properties propertyFile)
key
- of propertypropertyFile
- object representing the properties file.public static String getResourcesPath()
protected static void initApplicationDom(ClassLoader loader, String version, String applicationKey)
loader
- is class loaderversion
- is version of selector (target application version).applicationKey
- unic key of applicationpublic static void initializeScenarioProperties(ClassLoader loader)
public static void initializeWebdriversProperties(ClassLoader loader)
public static String getBrowser()
public static String getLang()
public static int getTimeout()
public static String getCryptoKey()
public static org.openqa.selenium.Proxy getProxy()
public static int getConnectTimeout()
public static int getWriteTimeout()
public static int getReadTimeout()
public static Locale getLocale()
public static boolean isStackTraceDisplayed()
public static boolean isHeadless()
public static String getModelPackages()
public static String getSelectorsVersion()
public static Callbacks.Callback getCallBack(String key)
public static Application getApplication(String applicationKey)
public static String getUrlByPagekey(String pageKey)
pageKey
- is key of pagepublic static String getApplicationByPagekey(String pageKey)
pageKey
- is key of pageprotected Statistics statisticsProcessor(ClassLoader loader, String packageName)
loader
- is class loader.packageName
- read for users statistic feature.Copyright © 2023 NoraUi. All rights reserved.