Perform the button's action.
348330
function doClick(buttonName) {
    var button = buttons[buttonName];
    if (!button) {
      return;
    }

    inputBox.focus();
    var linkOrImage = button === buttons.link || button.id === buttons.image;

    var state = new TextareaState(input);

    if (!state) {
      return;
    }

    var chunks = state.getChunks();

    // Some commands launch a "modal" prompt dialog.  Javascript
    // can't really make a modal dialog box and the WMD code
    // will continue to execute while the dialog is displayed.
    // This prevents the dialog pattern I'm used to and means
    // I can't do something like this:
    //
    // var link = CreateLinkDialog();
    // makeMarkdownLink(link);
    //
    // Instead of this straightforward method of handling a
    // dialog I have to pass any code which would execute
    // after the dialog is dismissed (e.g. link creation)
    // in a function parameter.
    //
    // Yes this is awkward and I think it sucks, but there's
    // no real workaround.  Only the image and link code
    // create dialogs and require the function pointers.
    var fixupInputArea = function () {

      inputBox.focus();

      if (chunks) {
        state.setChunks(chunks);
      }

      state.restore();
    };

    var noCleanup = button(chunks, fixupInputArea);

    if (!noCleanup) {
      fixupInputArea();
      if (!linkOrImage) {
        inputBox.adjustCursorPosition();
      }
    }
  }
229749
public function run()
    {
        if ($this->hasModel()) {
            $input = Html::activeTextInput($this->model, $this->attribute, $this->options);
            $this->mobileField = Html::getInputId($this->model,$this->mobileField);
        } else {
            $input = Html::textInput($this->name, $this->value, $this->options);
            $this->mobileField = $this->name;
        }
        $button = Html::button(Yii::t('yuncms', 'Get Verify Code'), $this->buttonOptions);

        $this->registerClientScript();
        echo strtr($this->template, [
            '{input}' => $input,
            '{button}' => $button,
        ]);
    }
138617
protected void fireAction(ActionListener action) {
        int      modifiers    = 0;
        AWTEvent currentEvent = EventQueue.getCurrentEvent();

        if (currentEvent instanceof InputEvent) {
            modifiers = ((InputEvent) currentEvent).getModifiers();
        } else if (currentEvent instanceof ActionEvent) {
            modifiers = ((ActionEvent) currentEvent).getModifiers();
        }

        ActionEvent e = new ActionEvent(getComponent(), ActionEvent.ACTION_PERFORMED, getComponent().getText(),
                                        EventQueue.getMostRecentEventTime(), modifiers);

        action.actionPerformed(e);
    }
1035242
@Override
    protected void doPerform() {
        if (isSourceDocumentRoot()) {
            getActions().contextClick().perform();
        } else {
            getActions().contextClick(getFirstElement()).perform();
        }
    }
642841
protected synchronized void execute() {
    ListParameterization config = new ListParameterization();
    parameterTable.appendParameters(config);
    runButton.setEnabled(false);
    try {
      configureStep(config);
      if(config.hasUnusedParameters()) {
        // List<Pair<OptionID, Object>> remainingParameters =
        // config.getRemainingParameters();
        LOG.warning("Unused parameters: " + "FIXME");
      }
      if(config.getErrors().size() > 0) {
        reportErrors(config);
      }
      else {
        executeStep();
      }
    }
    catch(Exception e) {
      LOG.exception(e);
    }
    updateStatus();
    firePanelUpdated();
  }
1180669
public static void click() {
		robot.mousePress(InputEvent.BUTTON1_MASK);
		robot.mouseRelease(InputEvent.BUTTON1_MASK);
		delay();
	}
1343931
def perform_action(
            self, action, machines, params, progress_title, success_title):
        """"""
        if len(machines) == 0:
            return 0
        with utils.Spinner() as context:
            return self._async_perform_action(
                context, action, list(machines), params,
                progress_title, success_title)
1359138
def _on_click(self, event):
        
        if callable(self.__callback):
            self.__callback(self.selection)
763533
def press_button(self, value):
    
    button = find_button(world.browser, value)
    if not button:
        raise AssertionError(
            "Cannot find a button named '{}'.".format(value))
    button.click()
307765
public function execute() {
    if (count($this->getInputParameters())) {
      if ($this->isSubmitComplete()) {
        $this->formValues = $this->getFormValues();
        $this->run();
      } else {
        $this->renderInputForm();
      }
    } else {
      $this->run();
    }
  }
1256339
def handleButtonClick(self, button):
        
        if ( self.signalsBlocked() ):
            return
        
        if ( button == self._buttonBox.button(QDialogButtonBox.Reset) ):
            self.resetRequested.emit()
        
        self.buttonClicked.emit(button)
64968
public void click() {
    assertElementNotStale();
    assertElementDisplayed();

    parent.getScopeServices().captureOperaIdle();

    if (getTagName().equals("OPTION")) {
      callMethod("return " + OperaAtom.CLICK + "(locator)");
    } else {
      parent.getMouse().click(getCoordinates());
    }

    try {
      parent.waitForLoadToComplete();
    } catch (ResponseNotReceivedException e) {
      // This might be expected
      logger.fine("Response not received, returning control to user");
    }
  }
852268
void onButtonFired(final ActionEvent event) {

        final Optional<Button> b = getTarget(event, Button.class);

        final Optional<UniqueKey<? extends Model>> data = getUserData(b, StackWaves.PAGE_MODEL_KEY);

        if (data.isPresent()) {
            model().sendWave(StackWaves.SHOW_PAGE_MODEL,
                             WBuilder.waveData(StackWaves.PAGE_MODEL_KEY, data.get()),
                             WBuilder.waveData(StackWaves.STACK_NAME, "DemoStack"));

        }
    }
827912
@Override
    protected void doPerform() {
        if (isSourceDocumentRoot()) {
            getActions().doubleClick().perform();
        } else {
            getActions().doubleClick(getFirstElement()).perform();
        }
    }
1288850
def run(self):
        """"""
        self.state = True
        if self.capture:
            self.display2.screen().root.grab_keyboard(X.KeyPressMask | X.KeyReleaseMask, X.GrabModeAsync, X.GrabModeAsync, X.CurrentTime)

        self.display2.record_enable_context(self.ctx, self.handler)
        self.display2.record_free_context(self.ctx)
1047888
def OnButtonCell(self, event):
        """"""

        if self.button_cell_button_id == event.GetId():
            if event.IsChecked():
                label = self._get_button_label()
                post_command_event(self, self.ButtonCellMsg, text=label)
            else:
                post_command_event(self, self.ButtonCellMsg, text=False)

        event.Skip()
1130474
def _on_action_triggered(self):
        
        action = self.sender()
        assert isinstance(action, QtWidgets.QAction)
        path = action.data()
        self.open_requested.emit(path)
        self.update_actions()