Class RestClient


  • public class RestClient
    extends Object
    Wrapper for RestTemplate class. Main purpose - encapsulate consumer from really used client and invocation complexity
    • Constructor Detail

      • RestClient

        public RestClient​(com.typesafe.config.Config config)
    • 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 locator
        nodePath - List of nodes
        currentUrl - 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 locator
        currentUrl - 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