In the previous versions of Qualitia (below 8.0.0), at many places there were some public static variables and methods used with the intention of making it accessible throughout the code. These variables/methods were generally used in classes such as callController, Controller, QualitiaOffline , GLOBALS, QualitiaSelenium ,QualitiaTestCase ,FwUtil ,QualitiaMobile. They had various usages.
In the latest Qualitia 8.0.0 version, these public api’s are the alternatives for the public static variables/methods used in older Qualitia Versions.
Example :-
Older Qualitia Versions (public static variables) | Latest Qualitia Version Public API |
1.) FwUtil.storeData() 2.) Controller.STOREHASHMAP 3.) Controller.testCaseName 4.) Controller.suiteName 5.) Controller.strObjectID 6.) QualitiaTestCase.isCustomAction 7.) QualitiaSelenium.getDriver() 8.) GLOBALS.CONFIG_OPTIMIZATION_MODE 9.) GLOBALS.mobileUDID 10.) FwUtil.resolveObjectProperties() | 1.) storeData(String key , String Value) 2.) getStoredData(String key) 3.) getTestCaseName() 4.) getSuiteName() 5.) getObjectID 6.) isCustomAction 7.) getWebDriver 8.) isOptimizationModeEnabled 9.) getMobileUDID 10.) resolveObjectProperties |
getWebDriver()
= This method is used to get the webdriver being used.
this is an alternative to QualitiaSelenium.getDriver()
For example, If the user wants to find an element on browser using ID, user can do it as:
In earlier versions:
if (locatorType.equalsIgnoreCase(CONSTANTS.ID)) {
element = QualitiaSelenium.getDriver().findElement(By.id(locator));
}
In Qualitia 8.0.0:
if (locatorType.equalsIgnoreCase(CONSTANTS.ID)) {
element = getWebDriver().findElement(By.id(locator));
}
getMobileDriver()
= This method is used to get the mobile driver being used.
this is an alternative to QualitiaMobile.getDriver()
For example, If the user wants to find an element on browser using ID, user can do it as:
In earlier versions:
if (locatorType.equalsIgnoreCase(CONSTANTS.XPATH)) {
element = QualitiaMobile.getDriver().findElementByXPath(By.id(locator));
}
In Qualitia 8.0.0:
if (locatorType.equalsIgnoreCase(CONSTANTS.XPATH)) {
element = getMobileDriver().findElementByXPath(By.id(locator));
}
storeData(String key, String value)
= this method is used to store environment data in StoreHashMap.
This is an alternative to FwUtil.storeData().
getStoredData(String key)
= This method is used to get the value of particular key stored in StoreHashMap.
This is an alternative to Controller.STOREHASHMAP.get().
storeDataContainsValue(String value)
= This method is used to find if Storehashmap has the particular value present or not. If it returns true then the Storehashmap has value else value is not present as store data.
This is an alternative to Controller.STOREHASHMAP.containsValue().
removeFromStoreData(String key)
This method is used to remove store data with particular key from StoreHashMap.
This is an alternative to Controller.STOREHASHMAP.remove()
getStoredDataAsObject
This method is used to get stored data as Objects.
storeDataAsObject(String key, Object value)
this method is used to store environment data as objects in StoreHashMap.
T7his is an alternative to FwUtil.storeData().
storeData(Map<String, String> storeMap)
= this method is used to store environment data in StoreHashMap where all the data is stored in storeMap along with their keys.
This is an alternative to FwUtil.storeData().
storeDataAsObject(Map<String, Object> storeMap)
this method is used to store environment data as objects in StoreHashMap where all the object data is stored in storeMap along with their keys.
storeDataContainsKey(String key)
This method is used to find if Storehashmap has the particular key present of not.
If it returns true then the Storehashmap has key else key is not present as store data.
This is an alternative to Controller.STOREHASHMAP.containsKey()
setCurrentWebExecutionPlatform(value)
This method is used to set the value of "CurrentWebExecutionPlatform".
The value can either be "DESKTOP" or "MOBILE" which can be set using "WebExecutionPlatform.DESKTOP" and "WebExecutionPlatform.MOBILE" respectively.
This can be used when the testcase switches platforms while execution.
This is an alternative to QualitiaTestCase.setCurrentWebExecutionPlatform().
For example: If user wants the current action to execute on Desktop, he can set it as:
In earlier versions:
QualitiaTestCase.setCurrentWebExecutionPlatform(WebExecutionPlatform.DESKTOP);
In Qualitia 8.0.0:
setCurrentWebExecutionPlatform(WebExecutionPlatform.DESKTOP)
getCurrentWebExecutionPlatform()
This method is used to get the value of "CurrentWebExecutionPlatform". The value can either be "WebExecutionPlatform.DESKTOP" or "WebExecutionPlatform.MOBILE".
This can be used to know which platform is the testcase running on currently.
This is an alternative to QualitiaTestCase.getCurrentWebExecutionPlatform()
For example: If user wants to do a particular operation when testcase is running on Desktop and another operation when testcase is running on Mobile, he can do it as:
In Qualitia 8.0.0:
if(getCurrentWebExecutionPlatform().equals(WebExecutionPlatform.DESKTOP)
{
//Desktop related operation
}
else if(getCurrentWebExecutionPlatform().equals(WebExecutionPlatform.MOBILE)
{
//Mobile related operation
}
In earlier versions:
if(QualitiaTestCase.getCurrentWebExecutionPlatform().equals(WebExecutionPlatform.DESKTOP)
{
//Desktop related operation
}
else if(QualitiaTestCase.getCurrentWebExecutionPlatform().equals(WebExecutionPlatform.MOBILE)
{
//Mobile related operation
}
isCurrentWebExecutionPlatformMobile()
This method is used to know if the current platform that the testcase is executing on is MOBILE or not. It returns true if the current web execution platform is Mobile and returns false if it is Desktop.
This is an alternative to CommonUtil.isCurrentWebExecutionPlatformMobile().
For example: If user wants to do a particular operation when testcase is running on Mobile, he can do it as:
In Qualitia 8.0.0:
if(isCurrentWebExecutionPlatformMobile())
{
//Mobile related operation
}
In earlier versions:
if(CommonUtil.isCurrentWebExecutionPlatformMobile())
{
//Mobile related operation
}
getIeDriverPath()
This method is used to get the value of Internet explorer driver path which is provided in the execution profile.
The value can be either given by user in the execution profile or if driver is downloaded automatically then it is a default value.
This is an alternative to GLOBALS.CONFIG_IE_DRIVERPATH.
For example, if the user wants to set system property value for IE driver, he can do it as:
In Qualitia 8.0.0:
System.setProperty("webdriver.ie.driver", GLOBALS.CONFIG_IE_DRIVERPATH);
In earlier versions:
System.setProperty("webdriver.ie.driver", GLOBALS.CONFIG_IE_DRIVERPATH);
getChromeDriverPath()
This method is used to get the value of Google Chrome driver path which is provided in the execution profile.
The value can be either given by user in the execution pofile or if driver is downloaded automatically then it is a default value.
This is an alternative to GLOBALS.CONFIG_CHROME_DRIVERPATH.
For example, if the user wants to set system property value for IE driver, he can do it as:
In Qualitia 8.0.0:
System.setProperty("webdriver.chrome.driver", GLOBALS.CONFIG_CHROME_DRIVERPATH);
In earlier versions:
System.setProperty("webdriver.chrome.driver", GLOBALS.CONFIG_CHROME_DRIVERPATH);
getFirefoxDriverPath()
= This method is used to get the value of Firefox driver path i.e. geckodriver which is provided in the execution profile.
The value can be either given by user in the execution profile or if driver is downloaded automatically then it is a default value.
This is an alternative to GLOBALS.CONFIG_FF_DRIVERPATH.
For example, if the user wants to set system property value for IE driver, he can do it as:
In earlier versions:
System.setProperty("webdriver.gecko.driver", GLOBALS.CONFIG_FF_DRIVERPATH);
In Qualitia 8.0.0:
System.setProperty("webdriver.gecko.driver", GLOBALS.CONFIG_FF_DRIVERPATH);
getActionResponse()
In previous versions of qualitia, all the action methods used to return int value. In latest engine, the return value of all the actions is ActionResponse.
It has two parameters: Message and ExecutionResult.
Message is the statement which you can provided with different outcomes of actions.
ExecutionResult is the output of the action which can be PASSED, FAILED, DEFECT or NOT_EXECUTED.
For example, if a user wants to write a custom action for checking two strings are equal, he can do it as:
In Qualitia 8.0.0:
public AcionResponse EqualStrings(String a, String b)
{
ActionResponse actionResponse = getActionResponse();
if(a.equals(b))
{
actionResponse.setMessage("they are equal");
actionResponse.setExecutionResult(ExecutionResult.PASSED);
return actionResponse;
}
else
{
actionResponse.setMessage("they are not equal");
actionResponse.setExecutionResult(ExecutionResult.FAILED);
return actionResponse;
}
}
In earlier versions:
public int EqualStrings(String a, String b)
{
if(a.equals(b))
{
DataLogger.writeToDebugAndInfoLogs("they are equal");
return 0;
}
else
{
DataLogger.writeToDebugAndInfoLogs("they are not equal");
return 1;
}
}
getStepId()
= This method is used to get the step ID.
this is an alternative to Controller.strStepID
for example, if the user wants to get the ID of current step being executed, he can do it as:
In Qualitia 8.0.0:
String stepid = getStepId();
In earlier versions:
String stepid = Controller.strStepID;
getTaskName()
This method is used to get the name of the current task which is being executed.
This is an alternative to Controller.taskName
For example, if the user wants to get the name of current task being executed, he can do it as:
In Qualitia 8.0.0:
String Taskname = getTaskName();
In earlier versions:
String Taskname= Controller.taskName;
getTestCaseName()
This method is used to get the name of current TC being executed.
This is an alternative to Controller.testCaseName
For example, if the user wants to get the name of current testcase being executed, he can do it as:
In Qualitia 8.0.0:
String TCname = getTestCaseName();
In earlier versions:
String TCname = Controller.testCaseName;
14)getTestCaseNameWithoutSpecialChars()
= This method is used to get the name of current TC being executed, without special characters like escape character(~).
this is an alternative to Controller.testCaseNameWithoutSpecialChars.
for example, if the user wants to get the name of current testcase being executed, he can do it as:
In earlier versions:
String TCname= Controller.testCaseNameWithoutSpecialChars;
In Qualitia 8.0.0:
String TCname = getTestCaseNameWithoutSpecialChars();
getScenarioName()
= This method is used to get the name of scenario being executed
this is an alternative to Controller.scenarioName
for example, if the user wants to get the name of current scenario being executed, he can do it as:
In Qualitia 8.0.0:
String scenarioName = getScenarioName();
In earlier versions:
String scenarioName = Controller.scenarioName;
getSuiteName()
= This method is used to get the name of current suite being executed
this is an alternative to Controller.suiteName
for example, if the user wants to get the name of current suite being executed, he can do it as:
In Qualitia 8.0.0:
String suiteName = getSuiteName();
In earlier versions:
String suiteName = Controller.suiteName;
getObjectID()
= This method is used to get current object Id.
This is an alternative to Controller.strObjectID.
for example, if the user wants to get the ID of current object on the browser where he wants to set some value, he can do it as:
In Qualitia 8.0.0:
String objectID = getObjectID();
In earlier versions:
String objectID = Controller.strObjectID;
getIterationFolderPath()
= This method is used to get the Iteration folder path i.e. where the report related data is stored.
The default value is "C:\Users\user.name\AppData\Local\Qualitia\WD\Client\ResultPath"
this is an alternative to Controller.ITERATION_FOLDER_PATH
for example, if the user wants to get the folder path where all the report related data is kept, he can do it as:
In Qualitia 8.0.0:
String itrFolderPath = getIterationFolderPath();
In earlier versions:
String itrFolderPath = Controller.ITERATION_FOLDER_PATH;
getSuitesDir()
= This method is used to get the suite Directory i.e. the folder path where all the JSON files are present. This is the same as provided in config/startupSettings.json
getMobileURL
This method is used to get appium server URL where appium server is hosted.
This is an alternative to GLOBALS.appiumServerURL
For example, If the user wants to give a messgae regarding connection failure to appium server, he can do this as:
In Qualitia 8.0.0:
public static String APPIUM_NOT_RUNNING = "Failed to connect to Appium Server at " +
getMobileURL()+ ". Please verify Appium server host and port and make sure that " +
"it is started before executing the test case.";
In earlier versions:
public String APPIUM_NOT_RUNNING = "Failed to connect to Appium Server at " +
GLOBALS.appiumServerURL + ". Please verify Appium server host and port and make sure that " +
"it is started before executing the test case.";
getCI_Tool()
= This method is used to get the value of CI_TOOL which is provided in the execution profile.
This is an alternative to GLOBALS.CONFIG_CITOOL
For example, if a user wants to get an Instance of particular CI Tool, he can do it as:
In Qualitia 8.0.0:
private static final CIHandler _CIH = CIFactory.getInstance(getCI_Tool());
In earlier versions:
private static final CIHandler _CIH = CIFactory.getInstance(GLOBALS.CONFIG_CITOOL);
getTestCaseCounter()
= this method is used to get the iteration number of Testcase being executed.
This is an alternative to Controller.testCaseCounter
isDesktopExecution()
= This method is used to decide if the Execution platform is Desktop or not. It returns true when the executing platform is Desktop and returns false when execution platform is Mobile.
This is an alternative to QualitiaSelenium.isDesktopExecution
For example: If user wants to do a particular operation when testcase is running on Desktop, he can do it as:
In Qualitia 8.0.0:
if(isDesktopExecution())
{
//Desktop related operation
}
In earlier versions:
if(QualitiaSelenium.isDesktopExecution)
{
//Desktop related operation
}
getProjectName()
= This method is used to get the project name as specified in the execution profile.
This is an alternative to GLOBALS.CONFIG_PROJECT
getUserName
= This method is used to get the user name as specified in the execution profile.
This is an alternative to GLOBALS.CONFIG_USERNAME
getBuildNum
= This method is used to get the Build number as specified in the execution profile.
This is an alternative to GLOBALS.CONFIG_BUILD_NUMBER .
getReleaseNum
= This method is used to get the release number as specified in the execution profile.
This is an alternative to GLOBALS.CONFIG_RELEASE_NUMBER.
getCreateInfoLog()
= This method is used to get the value of "CreateInfoLog" property as specified in the execution profile.
If the value is true, then Info Log file is created and if it is false then the Info Log file is not created.
getCreateDebugLog()
= This method is used to get the value of "CreateDebugLog" property as specified in the execution profile.
If the value is true, then Debug Log file is created and will be visible in report and if it is false then the Debug Log file is not created.
getCreateErrorLog()
= This method is used to get the value of "CreateErrorLog" property as specified in the execution profile.
If the value is true, then Error Log file is created and will be visible in report and if it is false then the Error Log file is not created.
getShowReportAfterExec()
= This method is used to get the value of "ShowReportAfterExec" property as specified in the execution profile.
If the value is true, then report is opened in a new browser window and if it is false then it is not opened in a browser window. The report is generated and stored in Iteration folder but it is not opened automatically.
getKeywordId()
= This method is used to get the ID of current function/action being executed.
this is an alternative to Controller.strKeywordID
getActionQClass()
= This method is used to get the base class of current function/action being executed.
this is an alternative to Controller.strActionQClass
getKeywordName()
= This method is used to get the name of current function/action executing.
this is an alternative to Controller.strKeywordName
isCustomAction()
= This method is used to decide if the currently executing action is custom action or qualitia action.
It returns true when the executing action is custom action and returns false when it is qualitia action.
this is an alternative to QualitiaSelenium.isCustomAction.
for example, if a user wants to do a particular operation depending whether the current executing action is custom action or not, he can do it as:
In earlier versions:
if(QualitiaSelenium.isCustomAction)
{//operation}
In Qualitia 8.0.0:
if(isCustomAction())
{//operation}
getCapturePassImage
= This method is used to get the value of "CapturePassImage" property as specified in the execution profile.
If the value is true, then screenshots are captured for steps that have executionResult as PASSED and if it is false then screenshots are not captured for PASSED steps.
getCaptureFailImage
= This method is used to get the value of "CaptureFailImage" property as specified in the execution profile.
If the value is true, then screenshots are captured for steps that have executionResult as FAILED and if it is false then screenshots are not captured for FAILED steps.
getCaptureDefectImage
= This method is used to get the value of "CaptureDefectImage" property as specified in the execution profile.
If the value is true, then screenshots are captured for steps that have executionResult as DEFECT and if it is false then screenshots are not captured for DEFECT steps.
getHeadlessMode()
= This method is used to get the value of "HeadlessMode" property as specified in the execution profile. If it return true then the browser is opened in headless mode else it is not.
This is an alternative to GLOBALS.CONFIG_HEADLESSMODE.
getFailStepOnBrowserScreenshotFailure
= This method is used to get the value of "FailStepOnBrowserScreenshotFailure" property as specified in the execution profile.
If the value is true, then if screenshots are not captured properly for PASSED steps then they are changed to FAILED.If it is false then even if screenshots are not captured for PASSED steps, execution continues normally.
getQualitiaPropValue(String key)
= this method is used to get value of any Qualitia property as specified in the execution profile. Here key is the Qualitia property name.
For example, if the user wants to know the value of "MobilePlatform", he can do it as:
String mobilePaltform = getQualitiaPropValue("MobilePlatform"
getSelectedWaitMode()
= This method is used to get the value of "WaitMode" property as specified in the execution profile.
The values can either be "EXPLCIT" or "IMPLICIT".
This is an alterantive to QualitiaSelenium.getSelectedWaitMode().
for example, if a user wants to do a certain task when waitmode is IMPLICIT, he can do it as:
In Qualitia 8.0.0:
if(getSelectedWaitMode() == CONSTANTS.WaitMode.IMPLICIT){
// task
}
In earlier versions:
if(QualitiaSelenium.getSelectedWaitMode() == CONSTANTS.WaitMode.IMPLICIT){
// task
}
getIntervalTimeOut()
= This method is used to get the value of "IntervalTimeOut" property as specified in the execution profile.
This is an alternative to QualitiaMobile.IntervalTimeOut
shutdownMobileDriverSession()
= This method is used for mobile driver cleanup process.
This is an alternative to QualitiaMobile.quitMobileDriver().
For example if a user has performed mobile operations using mobile driver and now wants to stop the driver, he can do itas :
In Qualitia 8.0.0:
shutdownMobileDriverSession()
In earlier versions:
QualitiaMobile.quitMobileDriver();
getSelectFrame()
= This is an alternative to Controller.EXECUTION_TESTCASES(Controller.testCaseCounter).getSelectFrame()
getBrowserName()
= This method is used to get the value of "BrowserName" property as specified in the execution profile.
The values can be "googleChrome, firefox,iexplorer and safari".
This is an alternative to QualitiaSelenium.getBrowser()
for example, if a user wants to perform certain task on firefox browser, he can do it as:
In Qualitia 8.0.0:
if (getBrowserName().equalsIgnoreCase(CONSTANTS.FIREFOX)
{
//task
}
In earlier versions:
if (QualitiaSelenium.getBrowser().equalsIgnoreCase(CONSTANTS.FIREFOX)
{
//task
}
getParamTypes()
= this method is used to get the parameter types of an action.
This is an alternative to QualitiaTestCase.paramTypes
For example, if a user wants to call a method using reflection, he can do it as:
In Qualitia 8.0.0:
Method m = class.getMethod(functionName, getParamTypes());
In earlier versions:
Method m = class.getMethod(functionName, QualitiaTestCase.paramTypes);
getElementHighlighter
This method is used to get the object of elementHighlighter class. It is used to highlight and unhighlight elements in browser.
For example, if a user wants to highlight and unhighlight and element, he can do it as:
In earlier versions:
FwUtil.highlightElement(),FwUtil.unhighlightElement()
In Qualitia 8.0.0:
getElementHighlighter.highlight(),getElementHighlighter.unhighlight()
getKeywordFunction()
This method is used to get the current function/action. This is an alternative to Controller.strKeywordFunction
getKeywordQFunction()
This method is used to get the Qfunction for particular keyword.
This is an alternative to Controller.strKeywordQFunc
isMobileDriverAlreadyLaunched()
= This method is used to know if the mobile driver is already launched or not.
If it returns true then the mobile driver has been launched else it is empty or its cleanup process is done.
This is an alternative to QualitiaMobile.isDriverAlreadyLaunched().
For example, if a user wants to print a message that Appium driver cannot be launched by checking, he can do it as:
In earlier versions:
if (QualitiaMobile.isDriverAlreadyLaunched()) {
_LOGGER.info("Appium Driver is already launched.");}
In Qualitia 8.0.0:
if (isMobileDriverAlreadyLaunched()) {
_LOGGER.info("Appium Driver is already launched.");}
getCurrentMobileAppType()
= This method is used to get which type of mobile app is being used. The values can be "NATIVE" or "HYBRID".
This is an alternative to QualitiaMobile.getCurrentMobileAppType()
setWebPlatformSession(PlatformSession webPlatformSession)
This method is used to set a new web driver. This is an alternative to QualitiaSelenium.setDriver()
for example, if the user wants to set a new browser web driver, he can do it as:
In Qualitia 8.0.0:
PlatformSessionBuilder platformSessionBuilder = new PlatformSessionBuilder(PlatformType.BROWSER_NAME);
Future<PlatformSession> webDriverSessionFuture = platformSessionBuilder.buildAsync();
setWebPlatformSession(webDriverSessionFuture.get());
setMobilePlatformSession(PlatformSession mobilePlatformSession)
this method is used to set a new mobile driver. This is an alternative to QualitiaMobile.setDriver()
for example, if the user wants to set a new browser mobile driver, he can do it as:
In Qualitia 8.0.0:
PlatformSessionBuilder platformSessionBuilder = new PlatformSessionBuilder(PlatformType.BROWSERNAME);
Future<PlatformSession> mobileDriverSessionFuture = platformSessionBuilder.buildAsync();
setMobilePlatformSession(mobileDriverSessionFuture.get());
setActionLevelPageLoadTimeout(String pageLoadTimeout)
= This method is used to set the value of "ActionLevelPageLoadTimeout" property.
This is an alternative to QualitiaSelenium.setActionLevelPageLoadTimeout()
getPageLoadTimeout()
= his method is used to get the value of "PageLoadTimeout" property.
This is an alternative to QualitiaSelenium.getPageLoadTimeout()
getMaximumFindObjectTimeImplicit()
= This method is used to get the value of "MaximumFindObjectTimeImplicit" property.
This is an alternative to QualitiaSelenium.MaximumFindObjectTimeImplicit()
getMaximumFindObjectTimeExplicit()
= This method is used to get the value of "MaximumFindObjectTimeExplicit" property.
This is an alternative to QualitiaSelenium.MaximumFindObjectTimeExplicit()
getPollingInterval()
= This method is used to get the value of "PollingInterval" property.
This is an alternative to QualitiaSelenium.getPollingInterval().
getMaximumFindObjectTimeForMobile()
= This method is used to get the value of "MaximumFindObjectTimeForMobile" property.
This is an alternative to QualitiaSelenium.maximumFindObjectTime().
getScreenCaptureMode()
= This method is used to get the value of "ScreenCaptureMode" property as specified in the execution profile.
Values can be BROWSER or DESKTOP.
This is an alternative to GLOBALS.CONFIG_SCREEN_CAPTURE_MODE.
getIntervalTimeOutForMobile()
= This method is used to get the value of IntervalTimout property.
This is an alternative to QualitiaMobile.IntervalTimeOut().
getMobileUDID()
= This method is used to get the value of "MobileUDID" as specified in the execution profile.
This property is used to specify the mobile on which the testcase should be run.
This is an alternative to GLOBALS.mobileUDID.
getMobileBrowser()
= This method is used to get the value of "MobileBrowser" as specified in the execution profile.
This property is used to specify the mobile browser on which the testcase should be run.
This is an alternative to GLOBALS.mobileBrowserName.
getAppiumServerURL()
= This method is used to get appium server URL where appium server is hosted.
This is an alternative to GLOBALS.appiumServerURL
For example, If the user wants to give a messgae regarding connection failure to appium server, he can do this as:
In Qualitia 8.0.0:
public static String APPIUM_NOT_RUNNING = "Failed to connect to Appium Server at " +
getAppiumServerURL()+ ". Please verify Appium server host and port and make sure that " +
"it is started before executing the test case.";
In earlier versions:
public String APPIUM_NOT_RUNNING = "Failed to connect to Appium Server at " +
GLOBALS.appiumServerURL + ". Please verify Appium server host and port and make sure that " +
"it is started before executing the test case.";
isOptimizationModeEnabled()
= This method is used to get the value of "OptimizationMode" property as specified in the execution profile.
If it returns true then OptimizationMode is enabled else it is not.
This is an alternative to GLOBALS.CONFIG_OPTIMIZATION_MODE.
isIgnoreAngularSynchronization()
= This method is used to get the value of "IgnoreAngularSynchronization" property as specified in the execution profile.
If it returns true then AngularSynchronization is ignored else it is not.
This is an alternative to GLOBALS.CONFIG_IGNORE_ANGULAR_SYNCHRONIZATION.
isExecutionHighlight()
= This method is used to get the value of "ExecutionHighlight" property as specified in the execution profile.
If it returns true then ExecutionHighlight is enabled else it is not.
This is an alternative to GLOBALS.CONFIG_IS_EXECUTION_HIGHLIGHT.
getAutoITPath()
This method is used to get the value of "AutoITPath" property as specified in the execution profile.
Default value is "C:\\Program Files (x86)\\AutoIt3".
This is an alternative to GLOBALS.CONFIG_AUTOITPATH.
getExecutionResultPath()
= This method is used to get the value of "ExecutionResultPath" property as specified in the execution profile.
It returns the folder path where Execution Result i.e. Report regarding particular suite execution is stored.
getExecutionEnvironment()
= This method is used to get the value of "ExecutionEnvironment" property as specified in the execution profile.
Value can either be "LOCAL" or "REMOTE". LOCAL means local machine and REMOTE includes SauceLabs,Perfecto, TestObject etc.
This is an alternative for GLOBALS.WEB_EXECUTION_ENVIRONMENT
For example, if a user wants to a perform a sauce related task, he can do it as:
In Qualitia 8.0.0:
if (getExecutionEnvironment().equalsIgnoreCase(ExecutionEnvironment.Sauce.getEnvironment())
{//task}
In earlier versions:
if (GLOBALS.WEB_EXECUTION_ENVIROMENT.equalsIgnoreCase(ExecutionEnvironment.Sauce.getEnvironment())
{//task}
getRemoteURL()
This method is used to get the value of "RemoteURL" property as specified in the execution profile.
This is an alternative to GLOBALS.CONFIG_REMOTE_URL.
It is used to get URL of remote environment like Sauce, PErfecto etc, if ExecutionEnvironment is set to remote.
getNewBrowserMode()
= This method is used to get the value of "NewBrowserMode" property as specified in the execution profile.
Values can either be "PerTC" or "PerSuite". If the value is PerTC then all the testcases in the suite are independent from each other. If the value is PerSuite then all the testcases are dependent on each other.
This is an alternative to QualitiaSelenium.getExecutionMode()
In Qualitia 8.0.0:
NewBrowserMode = PerTC/PerSuite
In earlier versions:
QualitiaExecMode= PT/PS
getMobileExecutionEnvironment()
= This method is used to get the value of "MobileExecutionEnvironment" property as specified in the execution profile.
Value can either be "testObject","perfectomobile","perfectoweb","saucemobile","sauceweb".
This is an alternative for GLOBALS.mobileExecutionEnvironment
For example, if a user wants to a perform a sauce related task, he can do it as:
In Qualitia 8.0.0:
if (getMobileExecutionEnvironment().equalsIgnoreCase(ExecutionEnvironment.Sauce.getEnvironment())
{//task}
In earlier versions:
if (GLOBALS.mobileExecutionEnvironment.equalsIgnoreCase(ExecutionEnvironment.Sauce.getEnvironment())
{//task}
getMobilePlatform
= This method is used to get the value of "MobilePlatform" property as specified in the execution profile.
Values can either be IOS or Android.
This is an alternative to GLOBALS.mobilePlatform
For example, if a user wants to decide which platform is being used for the testcase, he can do it as:
In Qualitia 8.0.0:
if (getMobilePlatform() == MobilePlatformName.ANDROID) {
System.out.print("ANDROID");
} else if (getMobilePlatform== MobilePlatformName.IOS) {
System.out.print("IOS");
}
In earlier versions:
if (GLOBALS.mobilePlatform == MobilePlatformName.ANDROID) {
System.out.print("ANDROID");
} else if (GLOBALS.mobilePlatform == MobilePlatformName.IOS) {
System.out.print("IOS");
}
getQualitiaServerURL
= This method is used to get the value of "QaulitiaServerURL" property as specified in the execution profile.
This is the URL where Qualitia Server is hosted.
This is an alternative to GLOBALS.CONFIG_QUALITIASERVERURL
getProductVersion()
This method is used to get the value of "ProductVersion" property as specified in the execution profile.
This is the version of Qualitia being used.
isCurrentQFunction(String func)
This method is used to decide if the provided func is currentlyt executing or not.
qIt returns true if current Action running is same as func given in paramter else it returns false.
This is an alternative to CommonUtil.isCurrentQFunction().
getDefaultWebExecutionPlatform
= This method is used to get the value of "DefaultWebExecutionPlatform" property as specified in the execution profile.
Value can either be MOBILE or DESKTOP. The value of this property decides on which platform will the web testcase be executed.
It can be used in hybrid testcase to know which platform is being used currently.
This is an alternative to GLOBALS.defaultWebExecutionPlatform
getMobileNativeObjectsSyncTime
This method is used to get the value of "MobileNativeObjectsSyncTime" property as specified in the execution profile.
getBrowserBinaryPath
= This method is used to get the value of "BrowserBinaryPath" property as specified in the execution profile.
getWindowsAuthentication
= This method is used to get the value of "WindowsAuthentication" property as specified in the execution profile.
getReportPath
= This method is used to get the value of "ReportPath" property as specified in the execution profile.
This is an alternative to GLOBALS.CONFIG_REPORTPATH
getBrowserProfilePath
= This method is used to get the value of "BrowserProfilePath" property as specified in the execution profile.
This is an alternative to GLOBALS.CONFIG_CUSTOM_PROFILEPATH.
getToolName
= This method is used to get the value of "ToolName" property as specified in the execution profile.
This is an alternative to GLOBALS.CONFIG_TOOLNAME.
getExecutionType
= This method is used to get the value of "ExecutionType" property as specified in the execution profile.
This is an alternative to GLOBALS.CONFIG_EXECUTION_TYPE
getGridPlatform
= this method is used to get the value of "GridPlatform" property as specified in the execution profile.
This is an alternative to GLOBALS.GRID_PLATFORM.
getCurrentWebExecutionPlatform
= this method is used to get the current platform on which the Testcase is executing. It can either be MOBILE or DESKTOP.
This is an alternative to QualitiaTestCase.getLastDriverTypeUsed().
setCurrentWebExecutionPlatform
= this method is used to set the current platform on which the Testcase must execute. It can either be MOBILE or DESKTOP.
This is an alternative to QualitiaTestCase.setLastDriverTypeUsed()
updateWebExecutionPlatformSystemVariables
= This method is used to update web execution platform in system variables.
getLastDriverTypeUsed
= this method is used to get the value of driver type used. It can be Web or Mobile.
This is an alternative to QualitiaTestCase.getLastDriverTypeUsed()
setLastDriverTypeUsed
= this method is used to set the value of driver type used. It can be Web or Mobile.
This is an alternative to QualitiaTestCase.setLastDriverTypeUsed()
resolveSpecialCharactersAndVariablesAndEscape
= this method is used to remove all the special characters and escape characters from expression provided in conditions like IF.
This is an alternative to FwUtil.resolveSpecialCharactersAndVariablesAndEscape().
resolveSpecialCharactersAndVariables
= this method is used to remove all the special characters and escape characters from expression provided in conditions like IF.
This is an alternative to FwUtil.resolveSpecialCharactersAndVariables().
resolveObjectProperties
= This method is used to resolve object properties.
getExecutionMode
= this method is used to get the Execution Mode value. Value can either be PS(PerSuite) or PT (PerTestCase).
This is an alternative to QualitiaSelenium.getExecutionMode()