本文整理了Java中com.gargoylesoftware.htmlunit.WebClient.getAlertHandler()
方法的一些代码示例,展示了WebClient.getAlertHandler()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebClient.getAlertHandler()
方法的具体详情如下:
包路径:com.gargoylesoftware.htmlunit.WebClient
类名称:WebClient
方法名:getAlertHandler
[英]Returns the alert handler for this webclient.
[中]返回此webclient的警报处理程序。
代码示例来源:origin: org.jvnet.hudson/htmlunit
/**
* The JavaScript function "alert()".
* @param message the message
*/
public void jsxFunction_alert(final Object message) {
// use Object as parameter and perform String conversion by ourself
// this allows to place breakpoint here and "see" the message object and its properties
final String stringMessage = Context.toString(message);
final AlertHandler handler = getWebWindow().getWebClient().getAlertHandler();
if (handler == null) {
LOG.warn("window.alert(\"" + stringMessage + "\") no alert handler installed");
}
else {
handler.handleAlert(document_.getHtmlPage(), stringMessage);
}
}
代码示例来源:origin: org.jenkins-ci/htmlunit
/**
* The JavaScript function "alert()".
* @param message the message
*/
public void jsxFunction_alert(final Object message) {
// use Object as parameter and perform String conversion by ourself
// this allows to place breakpoint here and "see" the message object and its properties
final String stringMessage = Context.toString(message);
final AlertHandler handler = getWebWindow().getWebClient().getAlertHandler();
if (handler == null) {
LOG.warn("window.alert(\"" + stringMessage + "\") no alert handler installed");
}
else {
handler.handleAlert(document_.getHtmlPage(), stringMessage);
}
}
代码示例来源:origin: net.disy.htmlunit/htmlunit
/**
* The JavaScript function "alert()".
* @param message the message
*/
public void jsxFunction_alert(final Object message) {
// use Object as parameter and perform String conversion by ourself
// this allows to place breakpoint here and "see" the message object and its properties
final String stringMessage = Context.toString(message);
final AlertHandler handler = getWebWindow().getWebClient().getAlertHandler();
if (handler == null) {
LOG.warn("window.alert(\"" + stringMessage + "\") no alert handler installed");
}
else {
handler.handleAlert(document_.getHtmlPage(), stringMessage);
}
}
代码示例来源:origin: net.sourceforge.htmlunit/htmlunit
/**
* The JavaScript function {@code alert()}.
* @param message the message
*/
@JsxFunction
public void alert(final Object message) {
// use Object as parameter and perform String conversion by ourself
// this allows to place breakpoint here and "see" the message object and its properties
final String stringMessage = Context.toString(message);
final AlertHandler handler = getWebWindow().getWebClient().getAlertHandler();
if (handler == null) {
LOG.warn("window.alert(\"" + stringMessage + "\") no alert handler installed");
}
else {
handler.handleAlert(document_.getPage(), stringMessage);
}
}
代码示例来源:origin: HtmlUnit/htmlunit
/**
* The JavaScript function {@code alert()}.
* @param message the message
*/
@JsxFunction
public void alert(final Object message) {
// use Object as parameter and perform String conversion by ourself
// this allows to place breakpoint here and "see" the message object and its properties
final String stringMessage = Context.toString(message);
final AlertHandler handler = getWebWindow().getWebClient().getAlertHandler();
if (handler == null) {
LOG.warn("window.alert(\"" + stringMessage + "\") no alert handler installed");
}
else {
handler.handleAlert(document_.getPage(), stringMessage);
}
}
内容来源于网络,如有侵权,请联系作者删除!