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

How to use
ProductInstance
in
com.atlassian.pageobjects

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: com.atlassian.jira/atlassian-jira-pageobjects

@Nonnull
private URL buildBaseUrl(@Nonnull final ProductInstance productInstance)
{
  try
  {
    return new URL(productInstance.getBaseUrl());
  }
  catch (MalformedURLException e)
  {
    throw new RuntimeException("Could not create product instance's base url", e);
  }
}
origin: com.atlassian.jira/atlassian-jira-pageobjects

public ProductInstanceBasedEnvironmentData(@Nonnull final ProductInstance productInstance)
{
  super(new Properties());
  notNull(productInstance);
  baseUrl = buildBaseUrl(productInstance);
  contextPath = productInstance.getContextPath();
  xmlDataLocation = new File("./xml");
}
origin: com.atlassian.jira/atlassian-jira-pageobjects

  @Override
  protected boolean checkInstalled()
  {
    return checkInstalledViaGet(jiraProduct.getBaseUrl() + "/rest/testkit-test/1.0/dataImport/importConfig");
  }
}
origin: com.atlassian.jira/atlassian-jira-pageobjects

public FieldPicker switchToCustomMode()
{
  if (getMode() != Mode.CUSTOM)
  {
    Tracer tracer = traceContext.checkpoint();
    customModeLink.click();
    Pattern xhrPattern = Pattern.compile(jiraProduct.getContextPath() + "/secure/((QuickCreateIssue!default.jspa\\?decorator=none)|(QuickEditIssue!default.jspa\\?issueId=([0-9]+)&decorator=none))");
    traceContext.waitFor(tracer, "AJS.$.ajaxComplete", xhrPattern);
  }
  return binder.bind(FieldPicker.class);
}
origin: com.atlassian.jira/atlassian-jira-pageobjects

  @Override
  protected boolean checkInstalled()
  {
    return checkInstalledViaGet(jiraProduct.getBaseUrl() + "/rest/func-test/1.0/slomo/default");
  }
}
origin: com.atlassian.jira/jira-ondemand-acceptance-tests

public static void repairEntityLinks(final JiraTestedProduct jira, final String projectKey) throws JSONException
{
  repairEntityLinks(jira, projectKey, jira.environmentData().getContext(), JiraProjectEntityType.class);
  repairEntityLinks(jira, projectKey,
      ForeignTestedProductFactory.newConfluenceTestedProduct().getProductInstance().getContextPath(), ConfluenceSpaceEntityType.class);
  repairEntityLinks(jira, projectKey,
      ForeignTestedProductFactory.newBambooTestedProduct().getProductInstance().getContextPath(), BambooProjectEntityType.class);
}
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.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.jira/atlassian-jira-pageobjects

private Config loadConfig()
{
  final String uri = jiraProduct.getBaseUrl() + "/rest/testkit-test/1.0/config-info";
  logger.debug("Request to " + uri);
  final HttpGet get = new HttpGet(uri);
  HttpResponse response = null;
  try
  {
    response = client.execute(get);
    final String responseString = EntityUtils.toString(response.getEntity());
    return parseResponse(responseString);
  }
  catch (IOException e)
  {
    throw new RuntimeException(e);
  }
  finally
  {
    closeQuietly(response);
  }
}
origin: com.atlassian.confluence/confluence-webdriver-pageobjects

  /**
   * get the login link from the anonymous warning message box
   */
  public Option<URI> getAnonymousWarningLoginLink() {
    return anonymousWarningMessageBox.get().map(input ->
        URI.create(product.getProductInstance().getBaseUrl() + input.findElement(By.tagName("a")).getAttribute("href")));
  }
}
origin: com.atlassian.plugins/atlassian-connect-server-integration-tests-support

public ConfluenceTestUserFactory(ConfluenceTestedProduct product) {
  this(product, ConfluenceRpc.newInstance(product.getProductInstance().getBaseUrl()));
}
origin: com.atlassian.confluence/confluence-webdriver-pageobjects

public void logOutFast() {
  webDriverTester.gotoUrl(getProductInstance().getBaseUrl() + "/plugins/functest/logout.action");
}
origin: com.atlassian.confluence/confluence-webdriver-pageobjects

/**
 * Faster way of login when in testing environment by embedding the credentials in the url,
 * so we don't have to visit the login page every single time.
 */
public <M extends Page> M autoLoginEmbeddingCredentialsInUrl(UserWithDetails user, Class<M> destinationClass, Object... args) {
  checkNotNull(destinationClass);
  DelayedBinder<M> binder = pageBinder.delayedBind(destinationClass, args);
  M p = binder.get();
  checkNotNull(p);
  URI uriBuilder = UriBuilder.fromUri(productInstance.getBaseUrl() + p.getUrl())
      .queryParam("os_username", user.getUsername())
      .queryParam("os_password", user.getPassword())
      .build();
  webDriverTester.gotoUrl(uriBuilder.toString());
  return binder.bind();
}
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.jira/atlassian-jira-pageobjects

public <P extends Page> DelayedBinder<P> visitDelayed(final Class<P> pageClass, final Object... args)
{
  final DelayedBinder<P> binder = pageBinder.delayedBind(pageClass, args);
  webDriverTester.gotoUrl(productInstance.getBaseUrl() + binder.get().getUrl());
  return binder;
}
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.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.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.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());
}
origin: com.atlassian.jira/jira-ondemand-acceptance-tests

public static void updateOndemandLicense(final JiraTestedProduct jira, final String license) throws Exception
{
  final String baseUrl = jira.getProductInstance().getBaseUrl();
  final DefaultHttpClient<Void> httpClient = createDefaultHttpClient(baseUrl);
  final long debugExecutionStart = System.currentTimeMillis();
  try
  {
    final Header authenticateHeader = BasicScheme.authenticate(Users.getDefaultSysAdminCredentials(), "UTF-8",
        false);
    final Request request = httpClient.newRequest(baseUrl + "/rest/ondemand/license/latest/license");
    request.setEntity(license).setContentType("text/plain")
        .setHeader(authenticateHeader.getName(), authenticateHeader.getValue());
    final Response r = request.put().get();
    if (r.getStatusCode() != Status.OK.getStatusCode())
    {
      throw new IllegalStateException("Error updating OD license " + request.getUri() + ", status code ="
          + r.getStatusCode() + ": " + r.getEntity());
    }
  }
  finally
  {
    httpClient.destroy();
    final long debugExecutionEnd = System.currentTimeMillis();
    System.out.println(String.format(
        "DEBUG com.atlassian.jira.utils.OndemandEnvironmentTestUtils.updateOndemandLicense execution took %.3f s",
        (debugExecutionEnd - debugExecutionStart) / 1000.0
    ));
  }
}
com.atlassian.pageobjectsProductInstance

Javadoc

Encapsulates information about the product instance being tested.

Most used methods

  • getBaseUrl
  • getContextPath

Popular in Java

  • Start an intent from android
  • setRequestProperty (URLConnection)
  • getExternalFilesDir (Context)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • TreeSet (java.util)
    A NavigableSet implementation based on a TreeMap. The elements are ordered using their Comparable, o
  • JButton (javax.swing)
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