Exemple #1
0
  // Sends the level of wood generation to the GUI
  public static void setWoodResource() {

    try {
      String wood;
      wood = WebAutomation.driver.findElement(By.xpath("//*[@id=\"wood\"]")).getText();
      BuildPanel.setVillageWoodAmountLabel(wood);
    } catch (NoSuchElementException e) {
    } catch (StaleElementReferenceException e) {
    }
  }