gpt4 book ai didi

com.atlassian.webdriver.pageobjects.WebDriverTester.getDriver()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-25 08:33:05 28 4
gpt4 key购买 nike

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

WebDriverTester.getDriver介绍

暂无

代码示例

代码示例来源:origin: com.atlassian.selenium/atlassian-webdriver-core

@Override
  public AtlassianWebDriver get()
  {
    return product.getTester().getDriver();
  }
};

代码示例来源:origin: com.atlassian.selenium/atlassian-webdriver-core

public void configure(Binder binder)
  {
    binder.bind(AtlassianWebDriver.class).toInstance(testedProduct.getTester().getDriver());
    binder.bind(WebDriver.class).toInstance(testedProduct.getTester().getDriver());
    binder.bind(SearchContext.class).toInstance(testedProduct.getTester().getDriver());
    binder.bind(PageFactoryPostInjectionProcessor.class);
    binder.bind(Waiter.class).to(WebDriverWaiter.class);
  }
}

代码示例来源:origin: com.atlassian.selenium/atlassian-webdriver-core

@Before
public void setup() {
  when(testerFactory.create()).thenReturn(tester);
  when(tester.getDriver()).thenReturn(webDriver);
}

代码示例来源:origin: com.atlassian.confluence/confluence-webdriver-pageobjects

@Override
public void configure(Binder binder) {
  final AtlassianWebDriver driver = testedProduct.getTester().getDriver();
  binder.bind(JavascriptExecutor.class).toInstance(driver);
  binder.bind(AjaxTracing.class).to(AjaxTracingImpl.class).asEagerSingleton();
  final Optional<Capabilities> capabilities = CapabilityUtils.getBrowserCapabilities(driver);
  if (capabilities.isPresent()) {
    binder.bind(Capabilities.class).toInstance(capabilities.get());
  }
  binder.bind(ConfluenceFrameExecutor.class).to(ConfluenceFrameExecutorTemplate.Lenient.class); // default, lenient == ignores frame exceptions
  binder.bind(ConfluenceFrameExecutor.class).annotatedWith(Names.named("lenient")).to(ConfluenceFrameExecutorTemplate.Lenient.class);
  binder.bind(ConfluenceFrameExecutor.class).annotatedWith(Names.named("strict")).to(ConfluenceFrameExecutorTemplate.Strict.class);
}

代码示例来源:origin: com.atlassian.jira.plugins/jira-dvcs-connector-pageobjects

private boolean requiresGrantAccess() {
    // if access has been granted before browser will
    // redirect immediately back to jira
    final String currentUrl = jira.getTester().getDriver().getCurrentUrl();
    return !currentUrl.contains("/jira");
  }
}

代码示例来源:origin: com.atlassian.confluence/confluence-webdriver-pageobjects

public boolean isViewRestricted() {
  return product.getTester().getDriver().getTitle().contains(NO_PERMISSION_PAGE_TITLE);
}

代码示例来源:origin: com.atlassian.confluence/confluence-webdriver-pageobjects

public void clearLocalStorage() {
  if (browserCapabilities.isPresent() && browserCapabilities.get().isJavascriptEnabled()) {
    getTester().getDriver().executeScript("localStorage && localStorage.clear()");
  }
}

代码示例来源:origin: com.atlassian.jira.plugins/jira-dvcs-connector-pageobjects

protected void setPageAsOld() {
  final String script =
      "var bodyElm = document.getElementsByTagName('body')[0];" +
          "var oldPageHiddenElm = document.createElement('input');" +
          "oldPageHiddenElm.setAttribute('id','old-page');" +
          "oldPageHiddenElm.setAttribute('type','hidden');" +
          "bodyElm.appendChild(oldPageHiddenElm);";
  jiraTestedProduct.getTester().getDriver().executeScript(script);
}

代码示例来源:origin: com.atlassian.jira/atlassian-jira-pageobjects

public void closeAllFlags()
  {
    jira.getTester().getDriver().executeScript(CLOSE_FLAGS_JS);
  }
}

代码示例来源:origin: com.atlassian.jira/atlassian-jira-pageobjects

private WebDriverDebug getWebDriverDebug()
  {
    return new WebDriverDebug(jira.getTester().getDriver());
  }
}

代码示例来源:origin: com.atlassian.jira/atlassian-jira-pageobjects

public void closeAll()
  {
    jira.getTester().getDriver().executeScript(CLOSE_ALL_JS);
  }
}

代码示例来源:origin: com.atlassian.jira/atlassian-jira-pageobjects

public void closeAll()
  {
    jira.getTester().getDriver().executeScript(CLOSE_ALL_JS);
  }
}

代码示例来源:origin: com.atlassian.jira.plugins/jira-dvcs-connector-pageobjects

private String authorizeGithubAppIfRequired() {
    waitWhileNewPageLaoded();

    String currentUrl = jiraTestedProduct.getTester().getDriver().getCurrentUrl();
    if (currentUrl.contains("/github.com/login/oauth")) {
      githubWebAuthorizeButton.click();
    }
    return jiraTestedProduct.getTester().getDriver().getCurrentUrl();
  }
}

代码示例来源:origin: com.atlassian.jira.plugins/jira-dvcs-connector-pageobjects

@Override
  public void grantAccess(JiraTestedProduct jira) {
    if (jira.getTester().getDriver().getPageSource().contains("This is not the web page you are looking for")) {
      throw new AssertionError("Invalid OAuth");
    }

    GithubGrantAccessPage grantAccessPage = jira.getPageBinder().bind(GithubGrantAccessPage.class);
    grantAccessPage.grantAccess();
  }
}

代码示例来源:origin: com.atlassian.confluence/confluence-webdriver-pageobjects

/**
   * Make the underlying driver refresh the current page, e.g. you change some config over XML-RPC.
   * <p>
   * Be aware that all your {@link WebElement}s become stale, so make sure you either use {@link PageElement}s or
   * re-locate them after calling this method.
   *
   * @see ElementBy
   * @see PageElementFinder
   */
  public ConfluenceTestedProduct refresh() {
    getTester().getDriver().navigate().refresh();
    return this;
  }
}

代码示例来源:origin: com.atlassian.confluence/confluence-webdriver-pageobjects

public void deleteCookieNamed(String name) {
  getTester().getDriver().manage().deleteCookieNamed(name);
}

代码示例来源:origin: com.atlassian.jira.plugins/jira-dvcs-connector-pageobjects

private String checkAndDoGithubLogin(final String username, final String password) {
  waitWhileNewPageLaoded();
  String currentUrl = jiraTestedProduct.getTester().getDriver().getCurrentUrl();
  if (currentUrl.contains("https://github.com/login?")) {
    githubWebLoginField.type(username);
    githubWebPasswordField.type(password);
    setPageAsOld();
    githubWebSubmitButton.click();
  }
  return jiraTestedProduct.getTester().getDriver().getCurrentUrl();
}

代码示例来源:origin: com.atlassian.applinks/applinks-pageobjects

private static boolean isAt(EchoPage page, TestedProduct<WebDriverTester> product) {
    return product.getTester().getDriver().getCurrentUrl().startsWith(product.getProductInstance().getBaseUrl())
        && page.isAt().now();
  }
}

代码示例来源:origin: com.atlassian.jira/atlassian-jira-pageobjects

public void waitForAny(int timeout)
{
  WebDriverPoller poller = new WebDriverPoller(jira.getTester().getDriver());
  poller.waitUntil(new ElementIsVisible(By.cssSelector(".jira-help-tip")), timeout);
}

代码示例来源:origin: com.atlassian.jira/atlassian-jira-pageobjects

public void waitForAny(int timeout) {
  WebDriverPoller poller = new WebDriverPoller(jira.getTester().getDriver());
  poller.waitUntil(new ElementLocated(By.cssSelector(".aui-inline-dialog")), timeout);
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com