Object SimpleCommandDispatcher.Companion
-
- All Implemented Interfaces:
public class SimpleCommandDispatcher.Companion
-
-
Field Summary
Fields Modifier and Type Field Description public final static SimpleCommandDispatcher.CompanionINSTANCE
-
Method Summary
-
-
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.
-
-
-
-