org.openqa.selenium.remote.RemoteWebDriver.getWindowHandle()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(132)

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

RemoteWebDriver.getWindowHandle介绍

暂无

代码示例

代码示例来源:origin: la-team/light-admin

@Override
public String getWindowHandle() {
  return webDriver.getWindowHandle();
}

代码示例来源:origin: com.github.becauseQA/becauseQA-utils

public WebDriver window(String windowHandleOrName) {
 try {
  execute(DriverCommand.SWITCH_TO_WINDOW, ImmutableMap.of("handle", windowHandleOrName));
  return RemoteWebDriver.this;
 } catch (NoSuchWindowException nsw) {
  // simulate search by name
  String original = getWindowHandle();
  for (String handle : getWindowHandles()) {
   switchTo().window(handle);
   if (windowHandleOrName.equals(executeScript("return window.name"))) {
    return RemoteWebDriver.this; // found by name
   }
  }
  switchTo().window(original);
  throw nsw;
 }
}

代码示例来源:origin: la-team/light-admin

@Override
public void forceFocusOnCurrentWindow() {
  webDriver.switchTo().window(webDriver.getWindowHandle());
}

代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui

@Override
public String getWindowHandle()
{
  return this.wrappedDriver.getWindowHandle();
}

代码示例来源:origin: com.applitools/eyes-selenium-java3

public String getWindowHandle() {
  return driver.getWindowHandle();
}

代码示例来源:origin: org.eclipse.che.selenium/che-selenium-core

@Override
public String getWindowHandle() {
 return driver.getWindowHandle();
}

代码示例来源:origin: org.mycore/selenium-utils

public String getWindowHandle() {
  return delegate.getWindowHandle();
}

相关文章