// Sends the population to the GUI public static void setPopulation() { try { String setPopulaton; setPopulaton = WebAutomation.driver.findElement(By.xpath("//*[@id=\"pop_current_label\"]")).getText(); String setPopulationMax; setPopulationMax = WebAutomation.driver.findElement(By.xpath("//*[@id=\"pop_max_label\"]")).getText(); TroopsDetailPanel.setPopulationCountLabel(setPopulaton + "/" + setPopulationMax); } catch (NoSuchElementException e) { } catch (StaleElementReferenceException e) { } }