Codota Logo
TestedProduct
Code IndexAdd Codota to your IDE (free)

How to use
TestedProduct
in
com.atlassian.pageobjects

Best Java code snippets using com.atlassian.pageobjects.TestedProduct (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: com.atlassian.selenium/atlassian-webdriver-core

public ProductInstance getProductInstance()
{
  return product.getProductInstance();
}
origin: com.atlassian.selenium/atlassian-pageobjects-api

  @SuppressWarnings("unchecked")
  public void configure(Binder binder)
  {
    binder.bind(TestedProduct.class).toInstance(testedProduct);
    binder.bind((Class<TestedProduct>) testedProduct.getClass()).toInstance(testedProduct);

    binder.bind(Tester.class).toInstance(testedProduct.getTester());
    binder.bind((Class<Tester>) testedProduct.getTester().getClass()).toInstance(testedProduct.getTester());

    binder.bind(ProductInstance.class).toInstance(testedProduct.getProductInstance());
  }
}
origin: com.atlassian.selenium/atlassian-webdriver-core

public PageBinder getPageBinder()
{
  return product.getPageBinder();
}
origin: com.atlassian.selenium/atlassian-webdriver-core

public WebDriverTester getTester()
{
  return product.getTester();
}
origin: com.atlassian.applinks/applinks-pageobjects

public static EchoPage goToIfNeeded(@Nonnull TestedProduct<WebDriverTester> product) {
  checkNotNull(product, "product");
  EchoPage page = product.getPageBinder().bind(EchoPage.class, false);
  if (isAt(page, product)) {
    return page;
  } else {
    return product.visit(EchoPage.class);
  }
}
origin: com.atlassian.selenium/atlassian-webdriver-core

public <P extends Page> P visit(Class<P> pageClass, Object... args)
{
  return product.visit(pageClass, args);
}
origin: com.atlassian.selenium/atlassian-webdriver-core

  @Override
  public AtlassianWebDriver get()
  {
    return product.getTester().getDriver();
  }
};
origin: com.atlassian.plugins/atlassian-connect-integration-tests-support

/**
 * Create a ConnectRunner for an add-on with a specified key
 * @param testedProduct the product to install the add-on into
 * @param key the key for the add-on
 */
public ConnectRunner(TestedProduct testedProduct, String key) {
  this(testedProduct.getProductInstance().getBaseUrl(), key);
}
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.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-pageobjects-api

/**
 * Checks whether given product supports injection. That is whether the product itself, or the associated page
 * binder is instance of {@link com.atlassian.pageobjects.inject.InjectionContext}.
 *
 * @param product product to verify
 * @return <code>true</code> if <tt>product</tt> supports injection
 */
public static boolean supportsInjection(TestedProduct<?> product)
{
  if (product == null)
  {
    return false;
  }
  return product instanceof InjectionContext || product.getPageBinder() instanceof InjectionContext;
}
origin: com.atlassian.plugins/atlassian-connect-server-integration-tests-support

/**
 * Create a ConnectRunner for an add-on with a specified key
 * @param testedProduct the product to install the add-on into
 * @param key the key for the add-on
 */
public ConnectRunner(TestedProduct testedProduct, String key) {
  this(testedProduct.getProductInstance().getBaseUrl(), key);
}
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.selenium/atlassian-pageobjects-api

/**
 * Checks whether given product supports injection. That is whether the product itself, or the associated page
 * binder is instance of {@link com.atlassian.pageobjects.inject.ConfigurableInjectionContext}.
 *
 * @param product product to verify
 * @return <code>true</code> if <tt>product</tt> supports configurable injection
 */
public static boolean supportsConfigurableInjection(TestedProduct<?> product)
{
  if (product == null)
  {
    return false;
  }
  return product instanceof ConfigurableInjectionContext || product.getPageBinder() instanceof ConfigurableInjectionContext;
}
origin: com.atlassian.plugins/atlassian-connect-integration-tests-support

private LifecycleTestUtils(TestedProduct<WebDriverTester> product) {
  String baseUrl = product.getProductInstance().getBaseUrl();
  this.product = product;
  this.addonControlClient = new AddonControlClient(baseUrl, "admin", "admin");
  this.connectClient = new AtlassianConnectRestClient(baseUrl, "admin", "admin");
}
origin: com.atlassian.selenium/atlassian-pageobjects-api

/**
 * Returns injection context associated with given <tt>product</tt>.
 *
 * @param product product to retrieve context from
 * @return associated injection context, either from the product, or its page binder
 * @throws IllegalArgumentException if the product is not providing injection (which can be verified by
 * calling {@link #supportsInjection(com.atlassian.pageobjects.TestedProduct)}
 */
public static InjectionContext asInjectionContext(TestedProduct<?> product)
{
  if (product instanceof InjectionContext)
  {
    return (InjectionContext) product;
  }
  else if (product.getPageBinder() instanceof InjectionContext)
  {
    return (InjectionContext) product.getPageBinder();
  }
  else
  {
    throw new IllegalArgumentException("Product <" + product + "> does not support injection");
  }
}
origin: com.atlassian.plugins/atlassian-connect-integration-tests-support

public HelpTipApiClient(TestedProduct product, TestUser user) {
  this.baseUrl = product.getProductInstance().getBaseUrl();
  this.defaultUsername = user.getUsername();
  this.defaultPassword = user.getPassword();
  this.userRequestSender = new UserRequestSender(baseUrl);
}
origin: com.atlassian.selenium/atlassian-pageobjects-api

  /**
   * Returns configurable injection context associated with given <tt>product</tt>.
   *
   * @param product product to retrieve context from
   * @return associated injection context, either from the product, or its page binder
   * @throws IllegalArgumentException if the product is not providing configurable injection (which can be verified by
   * calling {@link #supportsConfigurableInjection(com.atlassian.pageobjects.TestedProduct)}.
   */
  public static ConfigurableInjectionContext asConfigurableInjectionContext(TestedProduct<?> product)
  {
    if (product instanceof ConfigurableInjectionContext)
    {
      return (ConfigurableInjectionContext) product;
    }
    else if (product.getPageBinder() instanceof InjectionContext)
    {
      return (ConfigurableInjectionContext) product.getPageBinder();
    }
    else
    {
      throw new IllegalArgumentException("Product <" + product + "> does not support configurable injection");
    }
  }
}
origin: com.atlassian.plugins/atlassian-connect-server-integration-tests-support

public HelpTipApiClient(TestedProduct product, TestUser user) {
  this.baseUrl = product.getProductInstance().getBaseUrl();
  this.defaultUsername = user.getUsername();
  this.defaultPassword = user.getPassword();
  this.userRequestSender = new UserRequestSender(baseUrl);
}
origin: com.atlassian.plugins/atlassian-connect-server-integration-tests-support

public AcceptanceTestHelper(TestUser user, String descriptorUrl, TestedProduct product) {
  this.user = user;
  this.descriptorUrl = descriptorUrl;
  addonDescriptorParser = new AddonDescriptorParser(descriptorUrl);
  connectRestClient = new AtlassianConnectRestClient(
      product.getProductInstance().getBaseUrl(),
      user.getUsername(),
      user.getPassword());
}
com.atlassian.pageobjectsTestedProduct

Javadoc

The product being tested. Provides access to key services to be used during testing.

Most used methods

  • getProductInstance
  • getTester
  • getPageBinder
  • visit
    Constructs the page object, changes the browser URL to the desired page URL, then binds the object t

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getApplicationContext (Context)
  • runOnUiThread (Activity)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now