Object SimpleCommandDispatcher.Companion

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Triple<String, String, List<String>> parseSimpleFunctionCall(String input) Parses a kotlin function call from the input string, only functions calls with simple arguments are supported.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • parseSimpleFunctionCall

         final Triple<String, String, List<String>> parseSimpleFunctionCall(String input)

        Parses a kotlin function call from the input string, only functions calls with simple arguments are supported.

        This function parses a Kotlin function call string to extract the object name, function name, and argument list.

        Arguments are trimmed and split by commas, and each argument is parsed into a string. The resulting list of strings represents the arguments, regardless of their actual types.

        For example:

        driver.open("https://t.tt")
        driver.navigateTo("https://t.tt")
        driver.selectTextAll("div")
        driver.scrollToMiddle(0.4)
        driver.mouseWheelUp(2, 200, 200)
        driver.mouseWheelUp(2, 200, 200, 100)

        For simplification, the following malformed function call cases are also supported:

        driver.open(https://t.tt)
        driver.open('https://t.tt')
        driver.open(https://t.tt, )
        driver.mouseWheelUp(2, 200, 200, )
        Parameters:
        input - The command string to parse.
        Returns:

        A pair of function name and argument list, or null if the input is not a valid function call.