/** {@inheritDoc} */
  @Override
  protected ActionResponse internalExecute(
      TestContext context, PropertyList propertyList, Metadata metadata, WebActionType actionType) {

    ActionResponse result = TestResultHelper.createActionResponse();
    WebComponentCommand command = null;

    try {
      switch (actionType) {
        case ENTER:
          command = new EnterTextCommand(this.getSelenium());
          break;

        case READ:
          command = new ReadTextFieldCommand(this.getSelenium());
          break;

        case CLEAR:
          command = new ClearTextFieldCommand(this.getSelenium());
          break;

        case PRESS_KEY:
          command = new PressKeyCommand(this.getSelenium());
          break;

        default:
          return failResult(
              metadata,
              actionType,
              "Unsupported WebActionType for WebTextField: '" + actionType + "'");
      }

      // Execute WebCommand
      PropertyList returnProperties = command.execute(metadata, propertyList);

      result.setMessage("Executed WebTextField action='" + actionType + "'");
      result.setReturnProperties(returnProperties);
      result.setActionStatus(ActionStatusType.EXECUTED);
      return result;
    } catch (WebComponentException ex) {
      String errorMessage =
          "Could not execute "
              + actionType
              + " on WebTextField '"
              + metadata.getName().getValue()
              + "'. Cause: "
              + ex.getMessage();
      this.error(errorMessage);
      result.setErrorMessage(errorMessage);
      result.setActionStatus(ActionStatusType.FAILED);
      return result;
    } catch (Exception ex) {
      this.fatal(ex);
      result.setErrorMessage(
          "Could not execute "
              + actionType
              + " on WebTextField '"
              + metadata.getName().getValue()
              + "'. Cause: "
              + ex.toString());
      result.setActionStatus(ActionStatusType.FAILED);
      return result;
    } finally {

      if (context.isTracingEnabled() && command != null) {
        result.setActionTrace(command.getActionTrace());
      }
    }
  }