List of usage examples for org.openqa.selenium.chrome ChromeDriver findElementByXPath
@Override
public WebElement findElementByXPath(String using)
From source file:com.joseja.glassdoorscraper.GlassdoorScraper.java
private static int getNumberOfPages(ChromeDriver driver) throws NumberFormatException { final int NUM_COMPANIES = Integer .parseInt(driver.findElementByXPath("//*[@id=\"MainCol\"]/div[1]/header/div[1]/strong[3]").getText() .replace(",", "")); final int COMPANIES_PER_PAGE = 10; int NUM_PAGES = calculateNumberOfPages(NUM_COMPANIES, COMPANIES_PER_PAGE); return NUM_PAGES; }