Package com.thoughtworks.selenium

Examples of com.thoughtworks.selenium.Wait


        setSourceText(sourceText);
        // Switch to WYSIWYG tab but don't wait for the rich text area to load.
        switchToWysiwyg(false);
        // Switch back to source tab and wait there for the rich text area to load.
        switchToSource();
        new Wait()
        {
            public boolean until()
            {
                return !isElementPresent("//div[@class = 'xRichTextEditor']//div[@class = 'loading']");
            }
View Full Code Here


    /**
     * Wait for the step selector to load.
     */
    private void waitForStepSelector()
    {
        new Wait()
        {
            public boolean until()
            {
                return getSelenium().isElementPresent(
                    "//table[contains(@class, 'xStepsTabs') and not(contains(@class, 'loading'))]");
View Full Code Here

    }

    protected void waitForStepToLoad(String name)
    {
        final String locator = "//*[contains(@class, '" + name + "')]";
        new Wait()
        {
            public boolean until()
            {
                return getSelenium().isElementPresent(locator) && getSelenium().isVisible(locator);
            }
View Full Code Here

    }

    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().isEditable(TOOLBAR_SELECT_STYLE)
                    && (!getSelenium().isSomethingSelected(TOOLBAR_SELECT_STYLE) || !style.equals(getSelenium()
View Full Code Here

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

    public void switchToWysiwyg(boolean wait)
    {
        ensureElementIsNotCoveredByFloatingMenu(By.xpath(WYSIWYG_LOCATOR_FOR_WYSIWYG_TAB));
        getSelenium().click(WYSIWYG_LOCATOR_FOR_WYSIWYG_TAB);
        if (wait) {
            new Wait()
            {
                public boolean until()
                {
                    // When switching between tabs, it sometimes takes longer for toggle buttons to become enabled. We
                    // need to wait for that before we can properly use the WYSIWYG.
View Full Code Here

    public void switchToSource(boolean wait)
    {
        ensureElementIsNotCoveredByFloatingMenu(By.xpath(WYSIWYG_LOCATOR_FOR_SOURCE_TAB));
        getSelenium().click(WYSIWYG_LOCATOR_FOR_SOURCE_TAB);
        if (wait) {
            new Wait()
            {
                public boolean until()
                {
                    return getDriver().findElement(By.className("xPlainTextEditor")).isEnabled();
                }
View Full Code Here

     * @param enabled {@code true} to wait for the specified button to become enabled, {@code false} to wait for it to
     *            become disabled
     */
    public void waitForPushButton(final String pushButtonTitle, final boolean enabled)
    {
        new Wait()
        {
            public boolean until()
            {
                return enabled == isPushButtonEnabled(pushButtonTitle);
            }
View Full Code Here

     * @param enabled {@code true} to wait for the specified toggle button to become enabled, {@code false} to wait for
     *            it to become disabled
     */
    public void waitForToggleButton(final String toggleButtonTitle, final boolean enabled)
    {
        new Wait()
        {
            public boolean until()
            {
                return enabled == isToggleButtonEnabled(toggleButtonTitle);
            }
View Full Code Here

     * @param toggleButtonTitle the tool tip of a toggle button
     * @param down {@code true} to wait until the specified toggle button is down, {@code false} to wait until it is up
     */
    public void waitForToggleButtonState(final String toggleButtonTitle, final boolean down)
    {
        new Wait()
        {
            public boolean until()
            {
                return down == isToggleButtonDown(toggleButtonTitle);
            }
View Full Code Here

TOP

Related Classes of com.thoughtworks.selenium.Wait

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.