Package com.epam.healenium.client
Class RestClient
- java.lang.Object
-
- com.epam.healenium.client.RestClient
-
public class RestClient extends Object
Wrapper forRestTemplateclass. Main purpose - encapsulate consumer from really used client and invocation complexity
-
-
Constructor Summary
Constructors Constructor Description RestClient(com.typesafe.config.Config config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<LastHealingDataDto>getLastHealingData(org.openqa.selenium.By locator, String currentUrl)Get node path for given selectorvoidhealRequest(Context context)Collect results from previous healingList<Locator>imitate(HealeniumSelectorImitatorDto healeniumSelectorImitatorDto)Get imitated locators by target node and user selector from selector-imitator servicevoidselectorsRequest(org.openqa.selenium.By by, List<List<com.epam.healenium.treecomparing.Node>> nodePath, String currentUrl)Store info in backend
-
-
-
Method Detail
-
selectorsRequest
public void selectorsRequest(org.openqa.selenium.By by, List<List<com.epam.healenium.treecomparing.Node>> nodePath, String currentUrl)Store info in backend- Parameters:
by- element By locatornodePath- List of nodescurrentUrl- url of web page
-
healRequest
public void healRequest(Context context)
Collect results from previous healing- Parameters:
context- healing context
-
getLastHealingData
public Optional<LastHealingDataDto> getLastHealingData(org.openqa.selenium.By locator, String currentUrl)
Get node path for given selector- Parameters:
locator- element By locatorcurrentUrl- url of web page- Returns:
- lastHealingDataDto previous success healing data
-
imitate
public List<Locator> imitate(HealeniumSelectorImitatorDto healeniumSelectorImitatorDto)
Get imitated locators by target node and user selector from selector-imitator service- Parameters:
healeniumSelectorImitatorDto- element By locator- Returns:
- locators
-
-