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 Details

    • RestClient

      public RestClient(com.typesafe.config.Config config)
  • Method Details

    • selectorsRequest

      public void selectorsRequest(org.openqa.selenium.By by, List<List<com.epam.healenium.treecomparing.Node>> nodePath)
      Store info in backend
      Parameters:
      by - element By locator
      nodePath - List of nodes
    • healRequest

      public void healRequest(RequestDto requestDto, byte[] screenshot, String healingTime, MetricsDto metricsDto)
      Collect results from previous healing
      Parameters:
      screenshot - - image with healed element
      healingTime - - healing time
      metricsDto - - healenium metrics data
    • getLastHealingData

      public Optional<LastHealingDataDto> getLastHealingData(org.openqa.selenium.By locator)
      Get node path for given selector
      Parameters:
      locator - element By locator
      Returns:
      lastHealingDataDto
    • 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
    • getMapper

      public HealeniumMapper getMapper()