Class VariableDeclarationWithDynamicValue

java.lang.Object
jp.vmi.selenium.selenese.mutator.VariableDeclarationWithDynamicValue
All Implemented Interfaces:
ScriptMutator

public class VariableDeclarationWithDynamicValue
extends Object
implements ScriptMutator
Variable declaration with dynamic value.
  • Constructor Details

    • VariableDeclarationWithDynamicValue

      public VariableDeclarationWithDynamicValue​(String varName, Function<Context,​String> dynamicValue)
      Constructor.
      Parameters:
      varName - variable name.
      dynamicValue - value getter on demand.
  • Method Details

    • mutate

      public void mutate​(Context context, String script, StringBuilder outputTo)
      Description copied from interface: ScriptMutator
      Mutate a script. The original, unmodified script is used to generate a script on the StringBuilder, the "toString" method of which should be used to get the result. We make use of a StringBuilder rather than a normal String so that we can efficiently chain mutators.
      Specified by:
      mutate in interface ScriptMutator
      Parameters:
      context - SeleneseRunner context.
      script - The original script.
      outputTo - The mutated script.