Package com.epam.healenium.service
Class HealingService
java.lang.Object
com.epam.healenium.service.HealingService
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHealingService(com.typesafe.config.Config finalizedConfig, org.openqa.selenium.WebDriver driver) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.openqa.selenium.Byconstruct(com.epam.healenium.treecomparing.Node node, Set<SelectorComponent> detailLevel) construct cssSelector by NodevoidfindNewLocations(List<com.epam.healenium.treecomparing.Node> paths, com.epam.healenium.treecomparing.Node destination, Context context) protected HealedElementtoLocator(com.epam.healenium.treecomparing.Scored<com.epam.healenium.treecomparing.Node> node, Context context)
-
Field Details
-
driver
protected final org.openqa.selenium.WebDriver driver
-
-
Constructor Details
-
HealingService
public HealingService(com.typesafe.config.Config finalizedConfig, org.openqa.selenium.WebDriver driver)
-
-
Method Details
-
findNewLocations
public void findNewLocations(List<com.epam.healenium.treecomparing.Node> paths, com.epam.healenium.treecomparing.Node destination, Context context) - Parameters:
destination- the new HTML page source on which we should search for the elementpaths- source path to locatorcontext- context data for healing
-
toLocator
protected HealedElement toLocator(com.epam.healenium.treecomparing.Scored<com.epam.healenium.treecomparing.Node> node, Context context) - Parameters:
node- convert source node to locatorcontext- chain context- Returns:
- healedElement
-
construct
protected org.openqa.selenium.By construct(com.epam.healenium.treecomparing.Node node, Set<SelectorComponent> detailLevel) construct cssSelector by Node- Parameters:
node- - target nodedetailLevel- - final detail Level collection- Returns:
- target user selector
-