Code example for JsResult

Methods: cancel

0
      return result instanceof JsPromptResult;
    } 
 
    public void dismiss() { 
      unhandledAlerts.remove(this);
      result.cancel();
    } 
 
    public String getText() {
      return message;
    } 
 
    public void sendKeys(String keys) {
      if (!isPrompt()) { 
        throw new ElementNotVisibleException("Alert did not have text field"); 
      } 
      textToSend = (textToSend == null ? "" : textToSend) + keys;
    } 
  } 
}