public class SelfHealingController extends Object
A controller used by Self-healing Plug-in.
| Modifiers | Name | Description |
|---|---|---|
static String |
REPORT_FOLDER_NAME |
|
static String |
SELF_HEALING_DATA_FILE_NAME |
|
static String |
SELF_HEALING_FOLDER_NAME |
|
static String |
SELF_HEALING_FOLDER_PATH |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public static Set<com.kms.katalon.core.testobject.BrokenTestObject> |
findBrokenTestObjects(com.kms.katalon.core.testobject.TestObject testObject) |
|
public static List<com.kms.katalon.core.testobject.TestObject> |
findHealedTestObjects(com.kms.katalon.core.testobject.TestObject testObject) |
|
public static String |
getRelativePathToSelfHealindDir(String screenshotAbsolutePath) |
|
public static String |
getScreenshotAbsolutePath(String screenshotRelativePath) |
|
public static String |
getSelfHealingDataFilePath() |
|
public static String |
getSelfHealingDataFilePath(String folder) |
|
public static String |
getSelfHealingFolderPath() |
|
public static com.kms.katalon.core.testobject.TestObject |
healTestObject(com.kms.katalon.core.testobject.BrokenTestObject brokenTestObject) |
|
public static void |
logError(String message)Log an error with Self-healing plug-in's internal prefix. |
|
public static void |
logError(String message, Throwable throwable)Log an error with Self-healing plug-in's internal prefix. |
|
public static void |
logInfo(String message)Log an information with Self-healing plug-in's internal prefix. |
|
public static void |
logWarning(String message)Log an warning with Self-healing plug-in's internal prefix. |
|
public static void |
logWarning(String message, Throwable throwable)Log an warning with Self-healing plug-in's internal prefix. |
|
public static File |
prepareDataFile(String dataFilePath) |
|
public static com.kms.katalon.core.testobject.BrokenTestObjects |
readExistingBrokenTestObjects(String filePath) |
|
public static com.kms.katalon.core.testobject.BrokenTestObject |
registerBrokenTestObject(com.kms.katalon.core.testobject.TestObject testObject, String proposedLocator, com.kms.katalon.core.enums.mobile.LocatorStrategy proposedLocatorStrategy, com.kms.katalon.core.enums.mobile.LocatorStrategy recoveryLocatorStrategy, String pathToScreenshot) |
|
public static com.kms.katalon.core.testobject.BrokenTestObject |
registerBrokenTestObject(com.kms.katalon.core.testobject.TestObject testObject, String proposedLocator, com.kms.katalon.core.enums.mobile.LocatorStrategy proposedLocatorStrategy, com.kms.katalon.core.enums.mobile.LocatorStrategy recoveryLocatorStrategy, String pathToScreenshot, String dataFolderPath)Register a Test Object as broken, register this information along with a proposed locator to an internal file provided by Self-healing Plug-in. |
|
public static com.kms.katalon.core.testobject.BrokenTestObject |
registerBrokenTestObject(FindElementsResult findResult, com.kms.katalon.core.testobject.TestObject testObject) |
|
public static com.kms.katalon.core.testobject.BrokenTestObject |
registerBrokenTestObject(FindElementsResult findResult, com.kms.katalon.core.testobject.TestObject brokenTestObject, String dataFolder) |
|
public static void |
setLogger(com.kms.katalon.core.logging.KeywordLogger logger)This method initializes Self-healing Logger with a logger of the calling object, should be called first before doing anything |
|
public static String |
takeScreenShot(io.appium.java_client.AppiumDriver appiumDriver, org.openqa.selenium.WebElement element, String name)Take screenshot of a web element and saved to an internal folder provided by Self-healing Plug-in |
|
public static String |
takeScreenShot(io.appium.java_client.AppiumDriver appiumDriver, org.openqa.selenium.WebElement element, com.kms.katalon.core.testobject.TestObject testObject, String name) |
Log an error with Self-healing plug-in's internal prefix. Note that a KeywordLogger must be set first. see setLogger(KeywordLogger)
Log an error with Self-healing plug-in's internal prefix. Note that a KeywordLogger must be set first. see setLogger(KeywordLogger)
Log an information with Self-healing plug-in's internal prefix. Note that a KeywordLogger must be set first. see setLogger(KeywordLogger)
Log an warning with Self-healing plug-in's internal prefix. Note that a KeywordLogger must be set first. see setLogger(KeywordLogger)
Log an warning with Self-healing plug-in's internal prefix. Note that a KeywordLogger must be set first. see setLogger(KeywordLogger)
Register a Test Object as broken, register this information along with a proposed locator to an internal file provided by Self-healing Plug-in.
testObject
- The broken Test Object to be registeredproposedLocator
- The proposed locator for the broken Test ObjectproposedLocatorMethod
- The proposed locator method for the broken Test ObjectrecoveryMethod
- The recovery method that healed the broken Test ObjectpathToScreenshot
- Path to the screenshot of the web element retrieved by the
proposed locatorThis method initializes Self-healing Logger with a logger of the calling object, should be called first before doing anything
logger
- An KeywordLogger instanceTake screenshot of a web element and saved to an internal folder provided by Self-healing Plug-in
webDriver
- A WebDriver instance that's being used at the time calling
this functionelement
- The web element to be taken screenshot ofname
- Name of the screenshot