com.gargoylesoftware.htmlunit.WebClient.getWebWindowByName()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(151)

本文整理了Java中com.gargoylesoftware.htmlunit.WebClient.getWebWindowByName()方法的一些代码示例,展示了WebClient.getWebWindowByName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebClient.getWebWindowByName()方法的具体详情如下:
包路径:com.gargoylesoftware.htmlunit.WebClient
类名称:WebClient
方法名:getWebWindowByName

WebClient.getWebWindowByName介绍

[英]Returns the first WebWindow that matches the specified name.
[中]返回与指定名称匹配的第一个WebWindow。

代码示例

代码示例来源:origin: net.sourceforge.jwebunit/jwebunit-htmlunit-plugin

/**
 * Return the window with the given name in the current conversation.
 *
 * @param windowName
 * @throws WebWindowNotFoundException if the window could not be found
 */
public WebWindow getWindow(String windowName) {
 return wc.getWebWindowByName(windowName);
}

代码示例来源:origin: org.openqa.selenium.webdriver/webdriver-htmlunit

public WebDriver window(String windowId) {
  WebWindow window;
  try {
     window = webClient.getWebWindowByName(windowId);
  } catch (WebWindowNotFoundException e) {
    throw new NoSuchWindowException("Cannot find window: " + windowId);
  }
  webClient.setCurrentWindow(window);
  pickWindow();
  return HtmlUnitDriver.this;
}

代码示例来源:origin: org.seleniumhq.selenium/selenium-htmlunit-driver

@Override
public WebDriver window(String windowId) {
 try {
  WebWindow window = getWebClient().getWebWindowByName(windowId);
  return finishSelecting(window);
 } catch (WebWindowNotFoundException e) {
  List<WebWindow> allWindows = getWebClient().getWebWindows();
  for (WebWindow current : allWindows) {
   WebWindow top = current.getTopWindow();
   if (String.valueOf(System.identityHashCode(top)).equals(windowId)) {
    return finishSelecting(top);
   }
  }
  throw new NoSuchWindowException("Cannot find window: " + windowId);
 }
}

代码示例来源:origin: org.jenkins-ci/htmlunit

webWindow = getWebWindowByName(windowToOpen);

代码示例来源:origin: net.sourceforge.htmlunit/htmlunit

return getWebWindowByName(name);

代码示例来源:origin: org.jvnet.hudson/htmlunit

webWindow = getWebWindowByName(windowToOpen);

代码示例来源:origin: net.disy.htmlunit/htmlunit

webWindow = getWebWindowByName(windowToOpen);

代码示例来源:origin: org.jvnet.hudson/htmlunit

final WebWindow webWindow;
try {
  webWindow = webClient.getWebWindowByName(windowName);
  return webWindow.getScriptObject();

代码示例来源:origin: org.jenkins-ci/htmlunit

final WebWindow webWindow;
try {
  webWindow = webClient.getWebWindowByName(windowName);
  return webWindow.getScriptObject();

代码示例来源:origin: net.disy.htmlunit/htmlunit

final WebWindow webWindow;
try {
  webWindow = webClient.getWebWindowByName(windowName);
  return webWindow.getScriptObject();

代码示例来源:origin: HtmlUnit/htmlunit

return getWebWindowByName(name);

代码示例来源:origin: net.sourceforge.htmlunit/htmlunit

final WebWindow webWindow = webClient.getWebWindowByName(windowName);
return getProxy(webWindow);

代码示例来源:origin: HtmlUnit/htmlunit

final WebWindow webWindow = webClient.getWebWindowByName(windowName);
return getProxy(webWindow);

相关文章

WebClient类方法