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

    • saveElements

      public void saveElements(RequestDto requestDto)
      Store info in backend

      // * @param by element By locator // * @param nodePath List of nodes // * @param currentUrl url of web page

    • getElements

      public ConfigSelectorDto getElements()
    • healRequest

      public void healRequest(Context context)
      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 locator
      currentUrl - url of web page
      command - name of command
      Returns:
      lastHealingDataDto previous success healing data
    • imitate

      public List<Locator> imitate(SelectorImitatorDto selectorImitatorDto)
      Get imitated locators by target node and user selector from selector-imitator service
      Parameters:
      selectorImitatorDto - element By locator
      Returns:
      locators
    • initReport

      public void initReport(String sessionId)