Class HealingService

java.lang.Object
com.epam.healenium.service.HealingService

public class HealingService extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final org.openqa.selenium.WebDriver
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    HealingService(com.typesafe.config.Config finalizedConfig, org.openqa.selenium.WebDriver driver)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.openqa.selenium.By
    construct(com.epam.healenium.treecomparing.Node node, Set<SelectorComponent> detailLevel)
    construct cssSelector by Node
    void
    findNewLocations(List<com.epam.healenium.treecomparing.Node> paths, com.epam.healenium.treecomparing.Node destination, Context context)
     
    protected HealedElement
    toLocator(com.epam.healenium.treecomparing.Scored<com.epam.healenium.treecomparing.Node> node, Context context)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 element
      paths - source path to locator
      context - 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 locator
      context - 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 node
      detailLevel - - final detail Level collection
      Returns:
      target user selector