List of usage examples for org.openqa.selenium WebDriver findElement
@Override WebElement findElement(By by);
From source file:applango.common.services.Applango.genericApplangoWebsiteActions.java
public static int getAppRank(WebDriver driver1) throws IOException { int appRank = 0; appRank = Integer.parseInt(driver1.findElement(By.cssSelector(applangoObject.USERTABLER.getValue())) .findElements(By.cssSelector("td")).get(1).getText()); return appRank; }
From source file:applango.common.services.Applango.genericApplangoWebsiteActions.java
public static int getActivity(WebDriver driver1) throws IOException { int activity = 0; // String userRecord = getAppRankAndActivity(driver1); // int spaceSeperator = userRecord.indexOf(" "); activity = Integer.parseInt(driver1.findElement(By.cssSelector(applangoObject.USERTABLER.getValue())) .findElements(By.cssSelector("td")).get(2).getText()); return activity; }
From source file:applango.common.services.Applango.genericApplangoWebsiteActions.java
public static String getGroup(WebDriver driver1) throws IOException { return driver1.findElement(By.cssSelector(applangoObject.USERTABLER.getValue())) .findElements(By.cssSelector("td")).get(3).getText(); }
From source file:applango.common.services.Applango.genericApplangoWebsiteActions.java
public static void clickOnApplicationSettings(WebDriver driver1, WebDriverWait wait1) throws IOException { driver1.findElement(By.xpath("/html/body/span/span/div[2]/div/span/div/div/img")).click(); // driver1.findElement(By.cssSelector(applangoButtons.AUTHENTICATION_SETTINGS.getValue().toString())).click(); waitForAuthenticationScreen(wait1);// w ww .java 2s . c o m }
From source file:applango.common.services.Applango.genericApplangoWebsiteActions.java
public static void verifyNoAuthenticationSet(WebDriver driver1) throws IOException { Assert.assertTrue(driver1 .findElement(By.id(applangoTextfields.APPLICATION_CLIENT_KEY.getValue().toString())).isDisplayed()); Assert.assertTrue(// w w w . j ava 2 s . c o m driver1.findElement(By.id(applangoTextfields.APPLICATION_CLIENT_SECRET.getValue().toString())) .isDisplayed()); Assert.assertTrue(driver1.findElement(By.xpath(applangoButtons.AUTHENTICATION_SUBMIT.getValue().toString())) .isEnabled()); }
From source file:applango.common.services.Applango.genericApplangoWebsiteActions.java
public static void enterAuthentication(WebDriver driver1, String accessToken, String clientSecret) throws IOException { driver1.findElement(By.id(applangoTextfields.APPLICATION_CLIENT_KEY.getValue().toString())).clear(); driver1.findElement(By.id(applangoTextfields.APPLICATION_CLIENT_KEY.getValue().toString())) .sendKeys(accessToken);//from w ww . ja v a2 s. co m driver1.findElement(By.id(applangoTextfields.APPLICATION_CLIENT_SECRET.getValue().toString())).clear(); driver1.findElement(By.id(applangoTextfields.APPLICATION_CLIENT_SECRET.getValue().toString())) .sendKeys(clientSecret); }
From source file:applango.common.services.Applango.genericApplangoWebsiteActions.java
public static void clickOnAuthenticationSubmit(WebDriver driver1, WebDriverWait wait) throws IOException { logger.info("click On Authentication Submit Button"); driver1.findElement(By.xpath("/html/body/span/span/div[2]/div/div/div/button")).click(); // driver1.findElement(By.xpath(applangoButtons.AUTHENTICATION_SUBMIT.getValue().toString())).click(); waitForAuthenticateLink(wait);/*from ww w .j a va2 s . c o m*/ }
From source file:applango.common.services.Applango.genericApplangoWebsiteActions.java
public static void clickOnAuthenticationLink(WebDriver driver1, WebDriverWait wait) throws IOException { logger.info("click On Authentication link "); driver1.findElement(By.id(applangoObject.AUTHENTICATION_CLICK_HERE_LINK.getValue().toString())).click(); waitForAuthenticateVerify(wait);//from w w w . j av a2 s . c o m }
From source file:applango.common.services.Applango.genericApplangoWebsiteActions.java
public static void waitForSuccessfulAuthenticatedMessage(WebDriver driver1, WebDriverWait wait1) throws IOException { wait1.until(ExpectedConditions.visibilityOfElementLocated( By.id(applangoObject.AUTHENTICATION_AUTHENTICATED_SUCCESS.getValue().toString()))); Assert.assertTrue(driver1 .findElement(By.id(applangoObject.AUTHENTICATION_AUTHENTICATED_SUCCESS.getValue().toString())) .getText().contains(applangoMessages.AUTHENTICATION_SUCCESSFUL.getValue().toString())); }
From source file:applango.common.services.Applango.genericApplangoWebsiteActions.java
public static void clickOnVerifyAuthentication(WebDriver driver1) throws IOException { driver1.findElement(By.id(applangoButtons.AUTHENTICATION_VERIFY.getValue().toString())).click(); }