Package com.thoughtworks.selenium

Examples of com.thoughtworks.selenium.Wait$WaitTimedOutException


    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


            "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

    }

    @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

    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

    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

      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

        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

    @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

      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

    * @param timeout Timeout in milliseconds
    * @param locator Locator of element
    */
   public void waitForElement(final String locator, long timeout)
   {
      new Wait()
      {
         @Override
         public boolean until()
         {
            return isElementPresent(locator);
View Full Code Here

TOP

Related Classes of com.thoughtworks.selenium.Wait$WaitTimedOutException

Copyright © 2018 www.massapicom. 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.