Package com.epam.healenium.client
Class RestClient
java.lang.Object
com.epam.healenium.client.RestClient
Wrapper for
RestTemplate class.
Main purpose - encapsulate consumer from really used client and invocation complexity-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetReferenceElements(org.openqa.selenium.By locator, String command, String currentUrl) Get node path for given selectorvoidhealRequest(Context context) Collect results from previous healingimitate(SelectorImitatorDto selectorImitatorDto) Get imitated locators by target node and user selector from selector-imitator servicevoidinitReport(String sessionId) voidsaveElements(RequestDto requestDto) Store info in backend
-
Constructor Details
-
RestClient
public RestClient(com.typesafe.config.Config config)
-
-
Method Details
-
saveElements
Store info in backend// * @param by element By locator // * @param nodePath List of nodes // * @param currentUrl url of web page
-
getElements
-
healRequest
Collect results from previous healing- Parameters:
context- healing context
-
getReferenceElements
public Optional<ReferenceElementsDto> getReferenceElements(org.openqa.selenium.By locator, String command, String currentUrl) Get node path for given selector- Parameters:
locator- element By locatorcurrentUrl- url of web pagecommand- name of command- Returns:
- lastHealingDataDto previous success healing data
-
imitate
Get imitated locators by target node and user selector from selector-imitator service- Parameters:
selectorImitatorDto- element By locator- Returns:
- locators
-
initReport
-