Examples of Wait


Examples of com.palepail.TestGame.Actions.Wait

    switch (stage) {
    case 3: {
      sequentialScript.add(new SmoothMoveTo(this, new Vector2(10 * Configuration.gameScale, 18 * Configuration.gameScale),
          10));
      sequentialScript.add(new ToggleShooting(this, true, 1, 100));
      sequentialScript.add(new Wait(this, 100));
      sequentialScript.add(new SmoothMoveTo(this, new Vector2(17 * Configuration.gameScale, 14 * Configuration.gameScale),
          10));
      sequentialScript.add(new Wait(this, 100));
      sequentialScript.add(new SmoothMoveTo(this, new Vector2(10 * Configuration.gameScale, 18 * Configuration.gameScale),
          10));
      sequentialScript.add(new Wait(this, 100));
      sequentialScript.add(new SmoothMoveTo(this, new Vector2(3 * Configuration.gameScale, 14 * Configuration.gameScale),
          10));
      sequentialScript.add(new Wait(this, 100));
      break;
    }
    case 2: {
      sequentialScript.add(new SmoothMoveTo(this, new Vector2(10 * Configuration.gameScale, 18 * Configuration.gameScale),
          10));
      sequentialScript.add(new ToggleShooting(this, true, 1, 100));
      sequentialScript.add(new Wait(this, 100));
      sequentialScript.add(new SmoothMoveTo(this, new Vector2(17 * Configuration.gameScale, 14 * Configuration.gameScale),
          10));
      sequentialScript.add(new Wait(this, 100));
      sequentialScript.add(new SmoothMoveTo(this, new Vector2(10 * Configuration.gameScale, 18 * Configuration.gameScale),
          10));
      sequentialScript.add(new Wait(this, 100));
      sequentialScript.add(new SmoothMoveTo(this, new Vector2(3 * Configuration.gameScale, 14 * Configuration.gameScale),
          10));
      sequentialScript.add(new Wait(this, 100));
      break;
    }
    case 1: {
      sequentialScript.add(new SmoothMoveTo(this, new Vector2(10 * Configuration.gameScale, 18 * Configuration.gameScale),
          10));
      sequentialScript.add(new ToggleShooting(this, true, 1, 100));
      sequentialScript.add(new Wait(this, 100));
      sequentialScript.add(new SmoothMoveTo(this, new Vector2(17 * Configuration.gameScale, 14 * Configuration.gameScale),
          10));
      sequentialScript.add(new Wait(this, 100));
      sequentialScript.add(new SmoothMoveTo(this, new Vector2(10 * Configuration.gameScale, 18 * Configuration.gameScale),
          10));
      sequentialScript.add(new Wait(this, 100));
      sequentialScript.add(new SmoothMoveTo(this, new Vector2(3 * Configuration.gameScale, 14 * Configuration.gameScale),
          10));
      sequentialScript.add(new Wait(this, 100));
    }
    }
  }
View Full Code Here

Examples of com.thoughtworks.selenium.Wait

    String firstName = "Gavin";
    String lastName = "King";
    String message = "founder of the Hibernate open source object/relational mapping project";
    // find contact
    browser.open(CONTEXT_PATH + START_PAGE);
    new Wait() {
            @Override
            public boolean until() {
                return browser.isElementPresent(SEARCH_SUBMIT);
            }
    }.wait("Search submit link not found.");
View Full Code Here

Examples of com.thoughtworks.selenium.Wait

            "CZ");

    @Test
    public void testCreateContact() {
        browser.open(CONTEXT_PATH + START_PAGE);
        new Wait() {
            @Override
            public boolean until() {
                return browser.isElementPresent(CREATE_CONTACT_PAGE);
            }
        }.wait("Create contact link not found.");
        browser.click(CREATE_CONTACT_PAGE);
        browser.waitForPageToLoad(TIMEOUT);
        fillCreateContactForm(john);
        browser.click(CREATE_CONTACT_SUBMIT);
        new Wait() {
            @Override
            public boolean until() {
                return browser.isElementPresent(SEARCH_CONTACT_PAGE);
            }
        }.wait("Search link not found.");
View Full Code Here

Examples of com.thoughtworks.selenium.Wait

    }

    @Test
    public void testCreationCanceling() {
        browser.open(CONTEXT_PATH + START_PAGE);
        new Wait() {
            @Override
            public boolean until() {
                return browser.isElementPresent(CREATE_CONTACT_PAGE);
            }
        }.wait("Create contact link not found.");
        browser.click(CREATE_CONTACT_PAGE);
        browser.waitForPageToLoad(TIMEOUT);
        fillCreateContactForm(jane);
        browser.click(CREATE_CONTACT_CANCEL);
        new Wait() {
            @Override
            public boolean until() {
                return browser.isElementPresent(SEARCH_CONTACT_PAGE);
            }
        }.wait("Search link not found.");
View Full Code Here

Examples of com.thoughtworks.selenium.Wait

    public void testEditContact() {
        String firstName = "Shane";
        String lastName = "Bryzak";
        // find contact
        browser.open(CONTEXT_PATH + START_PAGE);
        new Wait() {
            @Override
            public boolean until() {
                return browser.isElementPresent(SEARCH_SUBMIT);
            }
        }.wait("Search submit link not found.");
View Full Code Here

Examples of com.thoughtworks.selenium.Wait

    public void testRemoveContact() {
        String firstName = "Norman";
        String lastName = "Richards";
        // find contact
        browser.open(CONTEXT_PATH + START_PAGE);
        new Wait() {
            @Override
            public boolean until() {
                return browser.isElementPresent(SEARCH_SUBMIT);
            }
        }.wait("Search submit link not found.");
View Full Code Here

Examples of com.thoughtworks.selenium.Wait

      browser.clickAndWait(getProperty("SELL_NEXT"));
   }
  
   protected void submitSell2Page(int category, int subcategory) {
      assertTrue("Navigation failure, sell2 page expected", browser.getLocation().contains(getProperty("SELL_2_URL")));
      new Wait()
      {
         @Override
         public boolean until()
         {
            return browser.isElementPresent(getProperty("SELL_CATEGORY_SELECT_SECOND_OPTION"));
         }
      };
      /*this sleeping is necessary because although the previous waiting ensures the 14. option present in select component in
      java code, the web page on its own is not ready yet*/
      try
      {
         Thread.sleep(listWaitTime);
      }
      catch (InterruptedException e)
      {
      }
     
      browser.select(getProperty("SELL_CATEGORY_SELECT"), "index=" + category);
      if (subcategory != 0)
      {
         new Wait()
         {
            @Override
            public boolean until()
            {
               return browser.isElementPresent(getProperty("SELL_SUBCATEGORY_SELECT"));
View Full Code Here

Examples of com.thoughtworks.selenium.Wait

        login(DEFAULT_USERNAME, DEFAULT_PASSWORD);
    }

    public boolean login(String username, String password) {
        browser.open(CONTEXT_PATH + getProperty("HOME_PAGE"));
        new Wait() {
            @Override
            public boolean until() {
                return browser.isElementPresent(getProperty("LOGIN_SUBMIT"));
            }
        }.wait("Login page not loaded.", Long.valueOf(TIMEOUT));
View Full Code Here

Examples of com.thoughtworks.selenium.Wait

    @Override
    @BeforeMethod
    public void setUp() {
        browser = startBrowser();
        browser.open(CONTEXT_PATH + getProperty("HOME_PAGE"));
        new Wait() {
            @Override
            public boolean until() {
                return browser.isElementPresent(getProperty("REGISTRATION"));
            }
        }.wait("Unable to load home page.");
View Full Code Here

Examples of com.thoughtworks.selenium.Wait

      result = browser.getAlert();
      assertTrue("An alert message should show up and should contain \"Hello,\" and name.", result.contains(ALERT_MESSAGE));     
   }  
  
   public void waitForAlertPresent(Long timeout){
      new Wait()
      {
         @Override
         public boolean until()
         {
            return browser.isAlertPresent();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.