Class SimpleCommandDispatcher

  • All Implemented Interfaces:

    
    public final class SimpleCommandDispatcher
    
                        

    Dispatches web driver commands in text format.

    This class is responsible for parsing and executing WebDriver commands provided as strings. It converts these string-based commands into executable actions.

    Author:

    Vincent Zhang

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Object execute(String command, WebDriver driver) Dispatches a WebDriver command in text format.
      • Methods inherited from class java.lang.Object

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

      • SimpleCommandDispatcher

        SimpleCommandDispatcher()
    • Method Detail

      • execute

         final Object execute(String command, WebDriver driver)

        Dispatches a WebDriver command in text format.

        This method takes a string that describes how to invoke a function and returns the actual executable action. For example, the command "driver.open('https://t.tt/')" will be parsed and executed accordingly.

        Parameters:
        command - The command in text format.
        driver - The WebDriver instance to execute the command on.