本文整理了Java中com.gargoylesoftware.htmlunit.WebClient.openTargetWindow()
方法的一些代码示例,展示了WebClient.openTargetWindow()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebClient.openTargetWindow()
方法的具体详情如下:
包路径:com.gargoylesoftware.htmlunit.WebClient
类名称:WebClient
方法名:openTargetWindow
[英]INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Open the window with the specified name. The name may be a special target name of _self, _parent, _top, or _blank. An empty or null name is set to the default. The special target names are relative to the opener window.
[中]内部API-随时可能更改-使用风险自负。
用指定的名称打开窗口。该名称可以是_self、_parent、_top或_blank的特殊目标名称。默认设置为空或空名称。特殊的目标名称是相对于“开启器”窗口的。
代码示例来源:origin: net.sourceforge.htmlunit/htmlunit
/**
* <span style="color:red">INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.</span><br>
*
* <p>Open a new web window and populate it with a page loaded by
* {@link #getPage(WebWindow,WebRequest)}</p>
*
* @param opener the web window that initiated the request
* @param target the name of the window to be opened (the name that will be passed into the
* JavaScript <tt>open()</tt> method)
* @param params any parameters
* @param <P> the page type
* @return the new page
* @throws FailingHttpStatusCodeException if the server returns a failing status code AND the property
* {@link WebClientOptions#setThrowExceptionOnFailingStatusCode(boolean)} is set to true.
* @throws IOException if an IO problem occurs
*/
@SuppressWarnings("unchecked")
public <P extends Page> P getPage(final WebWindow opener, final String target, final WebRequest params)
throws FailingHttpStatusCodeException, IOException {
return (P) getPage(openTargetWindow(opener, target, TARGET_SELF), params);
}
代码示例来源:origin: HtmlUnit/htmlunit
/**
* <span style="color:red">INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.</span><br>
*
* <p>Open a new web window and populate it with a page loaded by
* {@link #getPage(WebWindow,WebRequest)}</p>
*
* @param opener the web window that initiated the request
* @param target the name of the window to be opened (the name that will be passed into the
* JavaScript <tt>open()</tt> method)
* @param params any parameters
* @param <P> the page type
* @return the new page
* @throws FailingHttpStatusCodeException if the server returns a failing status code AND the property
* {@link WebClientOptions#setThrowExceptionOnFailingStatusCode(boolean)} is set to true.
* @throws IOException if an IO problem occurs
*/
@SuppressWarnings("unchecked")
public <P extends Page> P getPage(final WebWindow opener, final String target, final WebRequest params)
throws FailingHttpStatusCodeException, IOException {
return (P) getPage(openTargetWindow(opener, target, TARGET_SELF), params);
}
代码示例来源:origin: org.jvnet.hudson/htmlunit
/**
* <span style="color:red">INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.</span><br/>
*
* <p>Open a new web window and populate it with a page loaded by
* {@link #getPage(WebWindow,WebRequestSettings)}</p>
*
* @param opener the web window that initiated the request
* @param target the name of the window to be opened (the name that will be passed into the
* JavaScript <tt>open()</tt> method)
* @param params any parameters
* @param <P> the page type
* @return the new page
* @throws FailingHttpStatusCodeException if the server returns a failing status code AND the property
* {@link #setThrowExceptionOnFailingStatusCode(boolean)} is set to true.
* @throws IOException if an IO problem occurs
*/
@SuppressWarnings("unchecked")
public <P extends Page> P getPage(final WebWindow opener, final String target, final WebRequestSettings params)
throws FailingHttpStatusCodeException, IOException {
return (P) getPage(openTargetWindow(opener, target, "_self"), params);
}
代码示例来源:origin: net.disy.htmlunit/htmlunit
/**
* <span style="color:red">INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.</span><br/>
*
* <p>Open a new web window and populate it with a page loaded by
* {@link #getPage(WebWindow,WebRequestSettings)}</p>
*
* @param opener the web window that initiated the request
* @param target the name of the window to be opened (the name that will be passed into the
* JavaScript <tt>open()</tt> method)
* @param params any parameters
* @param <P> the page type
* @return the new page
* @throws FailingHttpStatusCodeException if the server returns a failing status code AND the property
* {@link #setThrowExceptionOnFailingStatusCode(boolean)} is set to true.
* @throws IOException if an IO problem occurs
*/
@SuppressWarnings("unchecked")
public <P extends Page> P getPage(final WebWindow opener, final String target, final WebRequestSettings params)
throws FailingHttpStatusCodeException, IOException {
return (P) getPage(openTargetWindow(opener, target, "_self"), params);
}
代码示例来源:origin: org.jenkins-ci/htmlunit
/**
* <span style="color:red">INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.</span><br/>
*
* <p>Open a new web window and populate it with a page loaded by
* {@link #getPage(WebWindow,WebRequestSettings)}</p>
*
* @param opener the web window that initiated the request
* @param target the name of the window to be opened (the name that will be passed into the
* JavaScript <tt>open()</tt> method)
* @param params any parameters
* @param <P> the page type
* @return the new page
* @throws FailingHttpStatusCodeException if the server returns a failing status code AND the property
* {@link #setThrowExceptionOnFailingStatusCode(boolean)} is set to true.
* @throws IOException if an IO problem occurs
*/
@SuppressWarnings("unchecked")
public <P extends Page> P getPage(final WebWindow opener, final String target, final WebRequestSettings params)
throws FailingHttpStatusCodeException, IOException {
return (P) getPage(openTargetWindow(opener, target, "_self"), params);
}
代码示例来源:origin: net.sourceforge.htmlunit/htmlunit
final WebWindow win = openTargetWindow(loadJob.requestingWindow_, loadJob.target_, "_self");
if (loadJob.urlWithOnlyHashChange_ != null) {
final HtmlPage page = (HtmlPage) loadJob.requestingWindow_.getEnclosedPage();
代码示例来源:origin: HtmlUnit/htmlunit
final WebWindow win = openTargetWindow(loadJob.requestingWindow_, loadJob.target_, "_self");
if (loadJob.urlWithOnlyHashChange_ != null) {
final HtmlPage page = (HtmlPage) loadJob.requestingWindow_.getEnclosedPage();
代码示例来源:origin: net.sourceforge.htmlunit/htmlunit
target = page.getResolvedTarget(getTargetAttribute());
final WebWindow win = page.getWebClient().openTargetWindow(page.getEnclosingWindow(), target, "_self");
Page enclosedPage = win.getEnclosedPage();
if (enclosedPage == null) {
代码示例来源:origin: net.sourceforge.htmlunit/htmlunit
final WebWindow window = openTargetWindow(opener, windowName, TARGET_BLANK);
final HtmlPage openerPage = (HtmlPage) opener.getEnclosedPage();
if (url != null) {
代码示例来源:origin: HtmlUnit/htmlunit
target = page.getResolvedTarget(getTargetAttribute());
final WebWindow win = page.getWebClient().openTargetWindow(page.getEnclosingWindow(), target, "_self");
Page enclosedPage = win.getEnclosedPage();
if (enclosedPage == null) {
代码示例来源:origin: HtmlUnit/htmlunit
final WebWindow window = openTargetWindow(opener, windowName, TARGET_BLANK);
final HtmlPage openerPage = (HtmlPage) opener.getEnclosedPage();
if (url != null) {
代码示例来源:origin: net.disy.htmlunit/htmlunit
final WebWindow window = openTargetWindow(opener, windowName, "_blank");
final HtmlPage openerPage = (HtmlPage) opener.getEnclosedPage();
if (url != null) {
代码示例来源:origin: org.jvnet.hudson/htmlunit
final WebWindow window = openTargetWindow(opener, windowName, "_blank");
final HtmlPage openerPage = (HtmlPage) opener.getEnclosedPage();
if (url != null) {
代码示例来源:origin: org.jenkins-ci/htmlunit
final WebWindow window = openTargetWindow(opener, windowName, "_blank");
final HtmlPage openerPage = (HtmlPage) opener.getEnclosedPage();
if (url != null) {
内容来源于网络,如有侵权,请联系作者删除!