Package com.epam.healenium
Class SelfHealingEngine
- java.lang.Object
-
- com.epam.healenium.SelfHealingEngine
-
public class SelfHealingEngine extends Object
-
-
Constructor Summary
Constructors Constructor Description SelfHealingEngine(@NotNull org.openqa.selenium.WebDriver delegate)Used, when client not override config explicitlySelfHealingEngine(@NotNull org.openqa.selenium.WebDriver delegate, @NotNull com.typesafe.config.Config config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]captureScreen(org.openqa.selenium.WebElement element)StringgetCurrentUrl()booleanisHealingBacklighted()booleanisHealingEnabled()StringpageSource()com.epam.healenium.treecomparing.NodeparseTree(String tree)voidsaveElements(PageAwareBy by, List<org.openqa.selenium.WebElement> webElements)Stores the valid locator state: the element it found and the page.voidsaveNodes(PageAwareBy key, List<List<com.epam.healenium.treecomparing.Node>> elementsToSave)Optional<com.epam.healenium.treecomparing.Scored<org.openqa.selenium.By>>toLocator(List<Locator> imitatedLocators, Double score)
-
-
-
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 actuallySelfHealingDriverinstance.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 locatorwebElements- 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)
-
-