Package com.epam.healenium.client
Class RestClient
java.lang.Object
com.epam.healenium.client.RestClient
public class RestClient extends Object
Wrapper for
RestTemplate class.
Main purpose - encapsulate consumer from really used client and invocation complexity-
Constructor Summary
Constructors Constructor Description RestClient(com.typesafe.config.Config config) -
Method Summary
Modifier and Type Method Description Optional<List<List<com.epam.healenium.treecomparing.Node>>>getLastValidPath(org.openqa.selenium.By locator, StackTraceElement element)Get node path for given selectorvoidhealRequest(org.openqa.selenium.By locator, StackTraceElement element, String page, List<com.epam.healenium.treecomparing.Scored<org.openqa.selenium.By>> choices, com.epam.healenium.treecomparing.Scored<org.openqa.selenium.By> healed, byte[] screenshot, String healingTime)Collect results from previous healingvoidselectorsRequest(org.openqa.selenium.By by, StackTraceElement element, List<List<com.epam.healenium.treecomparing.Node>> nodePath)Store info in backend
-
Constructor Details
-
RestClient
public RestClient(com.typesafe.config.Config config)
-
-
Method Details
-
selectorsRequest
public void selectorsRequest(org.openqa.selenium.By by, StackTraceElement element, List<List<com.epam.healenium.treecomparing.Node>> nodePath)Store info in backend- Parameters:
by- element By locatornodePath- List of nodeselement- StackTraceElement
-
healRequest
public void healRequest(org.openqa.selenium.By locator, StackTraceElement element, String page, List<com.epam.healenium.treecomparing.Scored<org.openqa.selenium.By>> choices, com.epam.healenium.treecomparing.Scored<org.openqa.selenium.By> healed, byte[] screenshot, String healingTime)Collect results from previous healing- Parameters:
locator- By locatorelement- StackTraceElementpage- pageObject namechoices- scored By locatorshealed- newly healed locatorscreenshot- image with healed elementhealingTime- healing time
-
getLastValidPath
public Optional<List<List<com.epam.healenium.treecomparing.Node>>> getLastValidPath(org.openqa.selenium.By locator, StackTraceElement element)Get node path for given selector- Parameters:
locator- element By locatorelement- StackTraceElement- Returns:
- nodes
-