本文整理了Java中com.gargoylesoftware.htmlunit.WebClient.getAjaxController()
方法的一些代码示例,展示了WebClient.getAjaxController()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebClient.getAjaxController()
方法的具体详情如下:
包路径:com.gargoylesoftware.htmlunit.WebClient
类名称:WebClient
方法名:getAjaxController
[英]Gets the current AJAX controller.
[中]获取当前的AJAX控制器。
代码示例来源:origin: stackoverflow.com
webClient.getAjaxController().processSynchron(page, webRequest, false);
if (webClient.getJavaScriptEngine().isScriptRunning())
代码示例来源:origin: HtmlUnit/htmlunit
final WebWindow ww = w.getWebWindow();
final WebClient client = ww.getWebClient();
final AjaxController ajaxController = client.getAjaxController();
final HtmlPage page = (HtmlPage) ww.getEnclosedPage();
final boolean synchron = ajaxController.processSynchron(page, webRequest_, async_);
代码示例来源:origin: net.sourceforge.htmlunit/htmlunit
final AjaxController ajaxController = client.getAjaxController();
final HtmlPage page = (HtmlPage) w.getWebWindow().getEnclosedPage();
final boolean synchron = ajaxController.processSynchron(page, webRequest_, async_);
代码示例来源:origin: net.sourceforge.htmlunit/htmlunit
final AjaxController ajaxController = client.getAjaxController();
final HtmlPage page = (HtmlPage) w.getWebWindow().getEnclosedPage();
final boolean synchron = ajaxController.processSynchron(page, webRequest_, async_);
代码示例来源:origin: net.disy.htmlunit/htmlunit
final AjaxController ajaxController = client.getAjaxController();
final HtmlPage page = (HtmlPage) getWindow().getWebWindow().getEnclosedPage();
final boolean synchron = ajaxController.processSynchron(page, requestSettings_, async_);
代码示例来源:origin: org.jvnet.hudson/htmlunit
/**
* Sends the specified content to the server in an HTTP request and receives the response.
* @param content the body of the message being sent with the request
*/
public void jsxFunction_send(final Object content) {
prepareRequest(content);
final WebClient client = getWindow().getWebWindow().getWebClient();
final AjaxController ajaxController = client.getAjaxController();
final HtmlPage page = (HtmlPage) getWindow().getWebWindow().getEnclosedPage();
final boolean synchron = ajaxController.processSynchron(page, requestSettings_, async_);
if (synchron) {
doSend(Context.getCurrentContext());
}
else {
// run this as a post-action
final Object startingScope = getWindow();
client.getJavaScriptEngine().addPostponedAction(new PostponedAction() {
public void execute() throws Exception {
client.getJavaScriptEngine().getContextFactory().call(new ContextAction() {
public Object run(final Context cx) {
cx.putThreadLocal(JavaScriptEngine.KEY_STARTING_SCOPE, startingScope);
doSend(cx);
return null;
}
});
}
});
}
}
代码示例来源:origin: org.jenkins-ci/htmlunit
/**
* Sends the specified content to the server in an HTTP request and receives the response.
* @param content the body of the message being sent with the request
*/
public void jsxFunction_send(final Object content) {
prepareRequest(content);
final WebClient client = getWindow().getWebWindow().getWebClient();
final AjaxController ajaxController = client.getAjaxController();
final HtmlPage page = (HtmlPage) getWindow().getWebWindow().getEnclosedPage();
final boolean synchron = ajaxController.processSynchron(page, requestSettings_, async_);
if (synchron) {
doSend(Context.getCurrentContext());
}
else {
// run this as a post-action
final Object startingScope = getWindow();
client.getJavaScriptEngine().addPostponedAction(new PostponedAction() {
public void execute() throws Exception {
client.getJavaScriptEngine().getContextFactory().call(new ContextAction() {
public Object run(final Context cx) {
cx.putThreadLocal(JavaScriptEngine.KEY_STARTING_SCOPE, startingScope);
doSend(cx);
return null;
}
});
}
});
}
}
代码示例来源:origin: HtmlUnit/htmlunit
final AjaxController ajaxController = client.getAjaxController();
final HtmlPage page = (HtmlPage) w.getWebWindow().getEnclosedPage();
final boolean synchron = ajaxController.processSynchron(page, webRequest_, async_);
内容来源于网络,如有侵权,请联系作者删除!