Examples of Wait


Examples of com.thoughtworks.selenium.Wait

    * @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

Examples of com.thoughtworks.selenium.Wait

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

Examples of com.thoughtworks.selenium.Wait

      }
   }

   private void waitForIcefaces(Long waitTime, Long timeout)
   {
      new Wait()
      {
         @Override
         public boolean until()
         {
            return isElementPresent(ICEFACES_IDLE_VISIBLE);
         }
      }.wait("Timeout while waiting for icefaces idle state.", timeout);
      try
      {
         Thread.sleep(icefacesWaitTime);
      }
      catch (InterruptedException e)
      {
         e.printStackTrace();
      }
      new Wait()
      {
         @Override
         public boolean until()
         {
            return isElementPresent("xpath=//body");
View Full Code Here

Examples of com.thoughtworks.selenium.Wait

       catch (InterruptedException e)
       {
       }
      
       // wait for page to get updated
       new Wait()
       {
           @Override
           public boolean until()
           {
               return !browser.isVisible(getProperty("SPINNER"));
           }
       }.wait("Spinner hasn't come out.");
      
       new Wait()
       {
           @Override
           public boolean until()
           {
               return (browser.isElementPresent(getProperty("SEARCH_RESULT_TABLE")) ||
View Full Code Here

Examples of com.thoughtworks.selenium.Wait

        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
        }
        // wait for page to get updated
        new Wait() {
            @Override
            public boolean until() {
                return !browser.isVisible(getProperty("SPINNER"));
            }
        }.wait("Spinner hasn't come out.");
        new Wait() {
            @Override
            public boolean until() {
                return (browser.isElementPresent(getProperty("SEARCH_RESULT_TABLE")) || browser
                        .isElementPresent(getProperty("NO_HOTELS_FOUND")));
            }
View Full Code Here

Examples of com.thoughtworks.selenium.Wait

        browser.waitForPageToLoad(TIMEOUT);
    }
   
    public void waitForForm() {
        if (getProperty("USE_ICEFACES_FORMS").equalsIgnoreCase("TRUE")) {
            new Wait() {           
                @Override
                public boolean until() {
                    return !browser.isElementPresent("xpath=//*[@style='cursor: wait;']")
                        && browser.isElementPresent(getProperty("FOOTER"));
                }
View Full Code Here

Examples of com.thoughtworks.selenium.Wait

    }

    public void applyStyle(final String style)
    {
        // Wait until the given style is not selected (because the tool bar might not be updated).
        new Wait()
        {
            public boolean until()
            {
                return !getSelenium().isSomethingSelected(TOOLBAR_SELECT_STYLE)
                    || !style.equals(getSelenium().getSelectedLabel(TOOLBAR_SELECT_STYLE));
View Full Code Here

Examples of com.thoughtworks.selenium.Wait

     *
     * @param style the expected style
     */
    public void waitForStyleDetected(final String style)
    {
        new Wait()
        {
            public boolean until()
            {
                return Integer.valueOf(getSelenium().getSelectedIndex(TOOLBAR_SELECT_STYLE)) >= 0
                    && style.equals(getSelenium().getSelectedLabel(TOOLBAR_SELECT_STYLE));
View Full Code Here

Examples of com.thoughtworks.selenium.Wait

     */
    public void switchToWysiwyg(boolean wait)
    {
        getSelenium().click(WYSIWYG_LOCATOR_FOR_WYSIWYG_TAB);
        if (wait) {
            new Wait()
            {
                public boolean until()
                {
                    return !getSelenium().isEditable(WYSIWYG_LOCATOR_FOR_SOURCE_TEXTAREA);
                }
View Full Code Here

Examples of com.thoughtworks.selenium.Wait

     */
    public void switchToSource(boolean wait)
    {
        getSelenium().click(WYSIWYG_LOCATOR_FOR_SOURCE_TAB);
        if (wait) {
            new Wait()
            {
                public boolean until()
                {
                    return getSelenium().isEditable(WYSIWYG_LOCATOR_FOR_SOURCE_TEXTAREA);
                }
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.