Class TargetScenarioItem

java.lang.Object
com.vaadin.copilot.testbenchgenerator.TestBenchScenarioItem
com.vaadin.copilot.testbenchgenerator.TargetScenarioItem
Direct Known Subclasses:
TargetAssertionScenarioItem, TargetEvent

public class TargetScenarioItem extends TestBenchScenarioItem
Represents a scenario item that targets a specific UI element within a TestBench test scenario.

This class extends TestBenchScenarioItem and contains metadata and selection strategies for identifying a particular element in the DOM. It is typically used during the generation or execution of automated UI tests, where identifying the right element and selector is crucial.

The following key attributes define the targeted element:

  • targetElementIdentifier - A unique identifier string used to generate a variable name for the element.
  • targetElementLocalName - The local (tag) name of the targeted DOM element, such as div, vaadin-button, etc.
  • classInfo - Contains reflective or structural information about the Java class representing the target element.
  • possibleSelectors - A set of possible CSS or DOM-based selectors that can be used to locate the target element during test execution.
  • Constructor Details

    • TargetScenarioItem

      public TargetScenarioItem()
  • Method Details

    • getTargetElementLocalName

      public String getTargetElementLocalName()
    • setTargetElementLocalName

      public void setTargetElementLocalName(String targetElementLocalName)
    • getClassInfo

      public TestBenchElementClassInfo getClassInfo()
    • setClassInfo

      public void setClassInfo(TestBenchElementClassInfo classInfo)
    • getPossibleSelectors

      public PossibleSelectors getPossibleSelectors()
    • setPossibleSelectors

      public void setPossibleSelectors(PossibleSelectors possibleSelectors)
    • getTargetElementIdentifier

      public String getTargetElementIdentifier()
    • setTargetElementIdentifier

      public void setTargetElementIdentifier(String targetElementIdentifier)