public class SelfHealingController
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<BrokenTestObject> |
findBrokenTestObjects(TestObject testObject) |
|
public static List<TestObject> |
findHealedTestObjects(TestObject testObject) |
|
public static String |
getRelativePathToSelfHealindDir(String screenshotAbsolutePath) |
|
public static String |
getScreenshotAbsolutePath(String screenshotRelativePath) |
|
public static String |
getSelfHealingDataFilePath() |
|
public static String |
getSelfHealingDataFilePath(String atFolder) |
|
public static String |
getSelfHealingFolderPath() |
|
public static TestObject |
healTestObject(TestObject 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 BrokenTestObjects |
readExistingBrokenTestObjects(String filePath) |
|
public static BrokenTestObject |
registerBrokenTestObject(TestObject testObject, String proposedLocator, SelectorMethod proposedLocatorMethod, SelectorMethod recoveryMethod, String pathToScreenshot) |
|
public static BrokenTestObject |
registerBrokenTestObject(TestObject testObject, String proposedLocator, SelectorMethod proposedLocatorMethod, SelectorMethod recoveryMethod, 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 void |
setLogger(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(WebDriver webDriver, 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(WebDriver webDriver, WebElement element, 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