List of usage examples for org.openqa.selenium By cssSelector
public static By cssSelector(String cssSelector)
From source file:com.atlassian.jira.pageobjects.pages.admin.ViewLicensePage.java
public String getLicenseDescription() { return licenseTable.find(By.cssSelector("tr:nth-child(3) td:nth-child(2) b")).getText(); }
From source file:com.atlassian.jira.pageobjects.pages.admin.ViewLicensePage.java
public String getServerId() { return licenseTable.find(By.cssSelector("tr:nth-child(4) td:nth-child(2) b")).getText(); }
From source file:com.atlassian.jira.pageobjects.pages.admin.ViewLicensePage.java
public String getSupportEntitlementNumber() { return licenseTable.find(By.cssSelector("tr:nth-child(5) td:nth-child(2) b")).getText(); }
From source file:com.atlassian.jira.pageobjects.pages.admin.ViewLicensePage.java
public int getUserLimit() { return Integer.valueOf(licenseTable.find(By.cssSelector("tr:nth-child(6) td:nth-child(2) b")).getText()); }
From source file:com.atlassian.jira.pageobjects.pages.admin.ViewLicensePage.java
public int getActiveUsers() { String userLimit = licenseTable.find(By.cssSelector("tr:nth-child(6) td:nth-child(2)")).getText(); Pattern re = Pattern.compile("[(]([0-9]+) currently active[)]"); Matcher m = re.matcher(userLimit); if (m.find()) { String activeUSers = m.group(1); return Integer.valueOf(activeUSers); }//from w w w . ja va2s . c o m return -1; }
From source file:com.atlassian.jira.pageobjects.pages.setup.LicenseSetupPage.java
License:Open Source License
public LicenseSetupPage selectExistingLicense(String licenseKey) { existingLicense.click();//from w w w . j a v a 2 s.c o m licenseKeyField = elementFinder.find(By.id("licenseKey")); submitButton = elementFinder.find(By.cssSelector(".aui-button-primary")); licenseKeyField.type(""); licenseKeyField.type(licenseKey); return this; }
From source file:com.atlassian.jira.webtest.webdriver.tests.security.TestLoginPage.java
@Test public void testIframeLoginPage() { IframeLoginPage loginPage = jira.visit(IframeLoginPage.class); assertFalse(loginPage.getBody().find(By.cssSelector("div#page>header")).timed().isPresent().now()); assertFalse(loginPage.getBody().find(By.cssSelector("div#page>footer")).timed().isPresent().now()); }
From source file:com.atlassian.jira.webtest.webdriver.tests.security.TestLoginPage.java
@Test public void testEmptyPageCaps() { CanonicalLoginPage loginPage = jira.visit(CanonicalLoginPage.class); assertTrue(loginPage.getBody().find(By.cssSelector("div#page>header")).timed().isPresent().now()); assertTrue(loginPage.getBody().find(By.cssSelector("div#page>footer")).timed().isPresent().now()); }
From source file:com.atlassian.jira.webtest.webdriver.tests.visualregression.TestVisualRegressionSmoke.java
@Test public void testBrowseProjectSummary() throws InterruptedException { goTo("/browse/BULK"); // ignore the 30 day summary graph addElementsToIgnore(By.cssSelector("#fragcreatedvsresolved img")); // Wait for the activity stream to load in... visualComparer.setWaitforJQueryTimeout(7000); assertUIMatches("browse-project-summary"); }
From source file:com.atlassian.webdriver.jira.page.LicenseDetailsPage.java
License:Open Source License
public String getOrganisation() { return licenseTable.findElement(By.cssSelector("tr:nth-child(1) td:nth-child(2) b")).getText(); }