Package org.seleniuminspector.html

Examples of org.seleniuminspector.html.InputInspector


    }

    protected void checkAutoCompletionFeature(String pageUrl) {
        testAppFunctionalPage(pageUrl);

        InputInspector field = dropDownField("formID:substringDD").field();
        WebElement field_ = getDriver().findElement(By.xpath(field.getXPath()));
        field_.sendKeys("w");
        field_.sendKeys("h");
        sleep(700);
        field.assertValue("Wheat");

        field_.sendKeys("i");
        sleep(700);
        field.assertValue("White");
    }
View Full Code Here


     @Test
    public void testWithA4JControlsInside() {
        testAppFunctionalPage("/components/tabbedpane/tabbedPane_a4j.jsf");

        InputInspector firstTab = new InputInspector("formID:tab_first_a4j");
        String oldTabFirst = firstTab.value();
        InputInspector secondTab = new InputInspector("formID:tab_second_a4j");
        String oldTabSecond = secondTab.value();
        ElementInspector firstTabContent = element("formID:first_content_a4j");
        String oldContentFirst = firstTabContent.text();

        secondTab.clickAndWait(OpenFacesAjaxLoadingMode.getInstance());
        ElementInspector secondTabContent = element("formID:second_content_a4j");
        String oldContentSecond = secondTabContent.text();

        element("formID:refresher_a4j").click();

        RichFacesAjaxLoadingMode.getInstance().waitForLoad();

        String newTabFirst = firstTab.value();
        String newTabSecond = secondTab.value();
        String newContentSecond = secondTabContent.text();

        firstTab.clickAndWait(OpenFacesAjaxLoadingMode.getInstance());
        String newContentFirst = firstTabContent.text();
        assertFalse(newTabFirst.equals(oldTabFirst));
View Full Code Here

        fillDataStandardInputs(serverValidationFormName);
        serverValidationSubmit.click();
        waitForPageToLoad();
        isPassedStandardInputs(serverValidationFormName);
        //client-side passed
        new InputInspector(clientValidationFormName + "inputSecret").type("password");
        clientValidationSubmit.click();
        waitForPageToLoad();
        isPassedStandardInputs(clientValidationFormName);
    }
View Full Code Here

        DateChooserInspector dateChooser = dateChooser("formID:styled");

        ElementInspector button = dateChooser.button();
        CalendarInspector calendarInspector = dateChooser.calendar();
        ElementInspector calendarBody = calendarInspector.body();
        InputInspector field = dateChooser.field();

        checkEnabledStyles(dateChooser, button, calendarInspector, calendarBody, field);
    }
View Full Code Here

        }
        DateChooserInspector dateChooser = dateChooser("formID:styled");

        ElementInspector button = dateChooser.button();
//    CalendarInspector calendarInspector = dateChooser.calendar();
        InputInspector field = dateChooser.field();

        element("formID:makeDisabled").clickAndWait();

        sleep(500);
        // disabledButtonImageUrl="../dropdown/dropdown_arrow_disabled.gif"
        button.childNodes().get(0).assertAttributeStartsWith("src", "../dropdown/dropdown_arrow_disabled.gif");

        // disabledButtonStyle="background: pink;"
        button.assertStyle("background: pink");

        // disabledFieldStyle="background: yellow; border: 2px solid green;"
        field.assertStyle("border: 2px solid green; background: yellow");

        // disabledStyle="width: 400px;"
        dateChooser.assertWidth(400);
    }
View Full Code Here

        TwoListSelectionInspector tls = twoListSelection(tlsId);
        ElementInspector leftList = tls.leftList();
        ElementInspector rightList = tls.rightList();
        ElementInspector leftHeader = tls.leftListHeader();
        ElementInspector rightHeader = tls.rightListHeader();
        InputInspector addBtn = tls.addButton();
        InputInspector addAllBtn = tls.addAllButton();
        InputInspector removeBtn = tls.removeButton();
        InputInspector removeAllBtn = tls.removeAllButton();
        InputInspector moveUpBtn = tls.moveUpButton();
        InputInspector moveDownBtn = tls.moveDownButton();

        String allButtonsStyle = "color: red; background-color: yellow; border: 2px solid green;";
        addAllBtn.assertStyle(allButtonsStyle);
        addBtn.assertStyle(allButtonsStyle);
        removeBtn.assertStyle(allButtonsStyle);
        removeAllBtn.assertStyle(allButtonsStyle);
        moveUpBtn.assertStyle(allButtonsStyle);
        moveDownBtn.assertStyle(allButtonsStyle);

        //headerStyle="color: pink; border: 2px dashed blue; background: beige;"
        leftHeader.assertText("Available items");
        rightHeader.assertText("Selected items");
        leftHeader.assertStyle("background-color: beige; color: pink; border: 2px dashed blue;");
        rightHeader.assertStyle("background-color: beige; color: pink; border: 2px dashed blue;");

        leftList.assertStyle("background-color: azure;");
        rightList.assertStyle("background-color: azure;");
        List<ElementInspector> options = leftList.childNodesByName("option");
        for (int i = 0; i < 6; i++) {
            ElementInspector option = options.get(i);
            option.assertText("itemL_" + (i + 1));
            option.assertStyle("font-weight: bold");
        }

        //style="width: 500px; border: 3px dotted brown;"
        tls.assertWidth(500);

        addAllBtn.assertExpressionEquals("title", "add all hint");
        addAllBtn.assertValue("add all");

        addBtn.assertExpressionEquals("title", "add hint");
        addBtn.assertValue("add");

        moveDownBtn.assertExpressionEquals("title", "move down hint");
        moveDownBtn.assertValue("move down");

        moveUpBtn.assertExpressionEquals("title", "move up hint");
        moveDownBtn.assertValue("move down");

        removeAllBtn.assertExpressionEquals("title", "remove all hint");
        removeAllBtn.assertValue("remove all");

        removeBtn.assertExpressionEquals("title", "remove hint");
View Full Code Here

        testAppFunctionalPage("/components/popuplayer/popupLayerJSFunctions.jsf");

        PopupLayerInspector popupLayer = popupLayer("formID:setLeftTop");

        popupLayer.assertVisible(false);
        InputInspector leftCoordinateInput = new InputInspector("leftCoodinate");
        leftCoordinateInput.type("100");
        InputInspector topCoordinateInput = new InputInspector("topCoodinate");
        topCoordinateInput.type("200");
        ElementInspector topLeftButton = element("setPopupLayerTopLeft");
        topLeftButton.click();

        popupLayer.assertVisible(true);
        element("formID:submit").clickAndWait();
        popupLayer.assertVisible(true);

        popupLayer.assertPosition(100, 200);

        leftCoordinateInput.type("300");
        topCoordinateInput.type("500");
        topLeftButton.click();

        popupLayer.assertPosition(300, 500);
    }
View Full Code Here

TOP

Related Classes of org.seleniuminspector.html.InputInspector

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.