Record Class McpMobileRecordedAction

java.lang.Object
java.lang.Record
com.shaft.mcp.McpMobileRecordedAction
Record Components:
stepId - stable identity assigned once at record time; never changes and never reused, even after McpMobileRecordingService.deleteStep(String). Recordings persisted before schema 1.1 lack this field; it is backfilled to "m" + sequence on read (see McpMobileRecordingService)
uniquenessCount - number of live elements the recorded locator matched at the moment the action executed, or 0 when no live page was available to check (e.g. mobile/Appium recordings, or any Playwright action that is not locator-bearing). Issue #4273: computed from the real Playwright driver by PlaywrightService, never fabricated.
locatorStable - whether the recorded locator looks human-authored rather than framework-generated, or false when unverified. Issue #4273: for ID-strategy Playwright locators this reuses LocatorPolicy.looksAutoGenerated; every other strategy/model reports false (unverified), matching this surface's pre-existing honest-refusal default.
replayXpath - a self-verified relative XPath the live driver independently confirmed matches exactly one element, or blank when none was computed/confirmed. Issue #4262: computed by PlaywrightService for XPATH-strategy (the recorded value itself, once confirmed unique) and NAME-strategy (a constructed //*[@name="..."] expression, independently re-verified live) recordings; every other strategy/model reports blank (unverified), matching this surface's pre-existing honest-refusal default.

public record McpMobileRecordedAction(String stepId, long sequence, String timestamp, String action, String locatorStrategy, String locatorValue, Map<String,String> parameters, String javaCode, boolean sensitiveValueStored, List<String> warnings, int uniquenessCount, boolean locatorStable, String replayXpath) extends Record
Persisted MCP mobile action for deterministic replay generation.
  • Constructor Details

    • McpMobileRecordedAction

      public McpMobileRecordedAction(String stepId, long sequence, String timestamp, String action, String locatorStrategy, String locatorValue, Map<String,String> parameters, String javaCode, boolean sensitiveValueStored, List<String> warnings, int uniquenessCount, boolean locatorStable, String replayXpath)
      Creates an immutable recorded action.
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • stepId

      public String stepId()
      Returns the value of the stepId record component.
      Returns:
      the value of the stepId record component
    • sequence

      public long sequence()
      Returns the value of the sequence record component.
      Returns:
      the value of the sequence record component
    • timestamp

      public String timestamp()
      Returns the value of the timestamp record component.
      Returns:
      the value of the timestamp record component
    • action

      public String action()
      Returns the value of the action record component.
      Returns:
      the value of the action record component
    • locatorStrategy

      public String locatorStrategy()
      Returns the value of the locatorStrategy record component.
      Returns:
      the value of the locatorStrategy record component
    • locatorValue

      public String locatorValue()
      Returns the value of the locatorValue record component.
      Returns:
      the value of the locatorValue record component
    • parameters

      public Map<String,String> parameters()
      Returns the value of the parameters record component.
      Returns:
      the value of the parameters record component
    • javaCode

      public String javaCode()
      Returns the value of the javaCode record component.
      Returns:
      the value of the javaCode record component
    • sensitiveValueStored

      public boolean sensitiveValueStored()
      Returns the value of the sensitiveValueStored record component.
      Returns:
      the value of the sensitiveValueStored record component
    • warnings

      public List<String> warnings()
      Returns the value of the warnings record component.
      Returns:
      the value of the warnings record component
    • uniquenessCount

      public int uniquenessCount()
      Returns the value of the uniquenessCount record component.
      Returns:
      the value of the uniquenessCount record component
    • locatorStable

      public boolean locatorStable()
      Returns the value of the locatorStable record component.
      Returns:
      the value of the locatorStable record component
    • replayXpath

      public String replayXpath()
      Returns the value of the replayXpath record component.
      Returns:
      the value of the replayXpath record component