Class SelfHealingEngine


  • public class SelfHealingEngine
    extends Object
    • Constructor Detail

      • SelfHealingEngine

        public SelfHealingEngine​(@NotNull
                                 @NotNull org.openqa.selenium.WebDriver delegate,
                                 @NotNull
                                 @NotNull com.typesafe.config.Config config)
        Parameters:
        delegate - a delegate driver, not actually SelfHealingDriver instance.
        config - user-defined configuration
      • SelfHealingEngine

        public SelfHealingEngine​(@NotNull
                                 @NotNull org.openqa.selenium.WebDriver delegate)
        Used, when client not override config explicitly
        Parameters:
        delegate - webdriver
    • Method Detail

      • saveElements

        public void saveElements​(PageAwareBy by,
                                 List<org.openqa.selenium.WebElement> webElements)
        Stores the valid locator state: the element it found and the page.
        Parameters:
        by - the locator
        webElements - the elements while it is still accessible by the locator
      • saveNodes

        public void saveNodes​(PageAwareBy key,
                              List<List<com.epam.healenium.treecomparing.Node>> elementsToSave)
      • toLocator

        public Optional<com.epam.healenium.treecomparing.Scored<org.openqa.selenium.By>> toLocator​(List<Locator> imitatedLocators,
                                                                                                   Double score)
      • pageSource

        public String pageSource()
      • parseTree

        public com.epam.healenium.treecomparing.Node parseTree​(String tree)
      • isHealingEnabled

        public boolean isHealingEnabled()
      • isHealingBacklighted

        public boolean isHealingBacklighted()
      • getCurrentUrl

        public String getCurrentUrl()
      • captureScreen

        public byte[] captureScreen​(org.openqa.selenium.WebElement element)