Package org.seleniuminspector.html

Examples of org.seleniuminspector.html.TableCellParams


        TableInspector table = dataTable("formID:twoHeadersTable");

        TableSectionInspector header = table.header();
        TableRowInspector firstHeaderRow = header.row(0);
        firstHeaderRow.assertCellParams(new TableCellParams[]{
                new TableCellParams(NBSP_CHAR, 1, 2,
                        "border-right: 1px solid #a0a0a0; border-bottom: 1px solid #a0a0a0"),
                new TableCellParams("String Fields", 4, 1,
                        "background: SteelBlue; border-right: 1px solid #a0a0a0; border-bottom: ? none ?"),
                new TableCellParams("Integer Fields", 3, 1,
                        "background: ForestGreen; border-right: ? none ?; border-bottom: ? none ?")
        });
        TableRowInspector secondHeaderRow = header.row(1);
        secondHeaderRow.assertCellParams(new TableCellParams[]{
                new TableCellParams(null, 1, 1,
                        "background: LightSteelBlue; border-right: ? none ?; border-bottom: 1px solid #a0a0a0"),
                new TableCellParams("String Field 1", 1, 1,
                        "background: LightSteelBlue; border-right: ? none ?; border-bottom: 1px solid #a0a0a0"),
                new TableCellParams("String Field 2", 1, 1,
                        "background: LightSteelBlue; border-right: ? none ?; border-bottom: 1px solid #a0a0a0"),
                new TableCellParams("String Field 3", 1, 1,
                        "background: LightSteelBlue; border-right: 1px solid #a0a0a0; border-bottom: 1px solid #a0a0a0"),
                new TableCellParams("Int Field 1", 1, 1,
                        "background: LawnGreen; border-right: ? none ?; border-bottom: 1px solid #a0a0a0"),
                new TableCellParams("Int Field 2", 1, 1,
                        "background: LawnGreen; border-right: ? none ?; border-bottom: 1px solid #a0a0a0"),
                new TableCellParams("Int Field 3", 1, 1,
                        "background: LawnGreen; border-right: ? none ?; border-bottom: 1px solid #a0a0a0")
        });

        TableSectionInspector body = table.body();
        assertEquals("Checking body row count", 10, body.rowCount());
View Full Code Here


        assertEquals("There should be two header rows", 2, table.header().rowCount());
        assertEquals("There should be 10 body rows", 10, table.body().rowCount());
        assertFalse("There should be no footer", table.footer().elementExists());

        table.header().row(0).assertCellParams(new TableCellParams[]{
                new TableCellParams(NBSP_CHAR),
                new TableCellParams("String Field 1"),
                new TableCellParams("String Field 2"),
                new TableCellParams("String Field 3"),
                new TableCellParams("Int Field 1"),
                new TableCellParams("Int Field 2"),
                new TableCellParams("Int Field 3")
        });

        assertEquals("Checking number of columns", 7, table.getColumnCount());

        for (int i = 0; i <= 3; i++)
View Full Code Here

        footer.row(0).assertCellStyles("border-bottom: ? none ?");
        footer.row(1).assertCellStyles("border-top: ? none ?");
        footer.row(1).assertCellStyles("border-bottom: ? none ?");

        table.footer().row(0).assertCellParams(new TableCellParams[]{
                new TableCellParams(null, 1, 1, "background: DarkKhaki"),
                new TableCellParams("String Field 1", 1, 1, "background: DarkKhaki"),
                new TableCellParams("String Field 2", 1, 1, "background: DarkKhaki"),
                new TableCellParams("String Field 3", 1, 1, "background: DarkKhaki"),
                new TableCellParams("Int Field 1", 1, 1, "background: BurlyWood"),
                new TableCellParams("Int Field 2", 1, 1, "background: LightSalmon"),
                new TableCellParams("Int Field 3", 1, 1, "background: BurlyWood")
        });
        table.footer().row(1).assertCellParams(new TableCellParams[]{
                new TableCellParams("String Fields", 4, 1, "background: Olive"),
                new TableCellParams("Integer Fields", 3, 1, "background: Peru")
        });

        assertEquals("Checking number of columns", 7, table.getColumnCount());
        for (int i = 0; i <= 3; i++)
            table.column(i).assertStyle("background: Khaki");
View Full Code Here

        assertEquals("Checking the number of columns", 9, table.getColumnCount());

        TableSectionInspector header = table.header();
        assertEquals("Checking the number of header rows", 4, header.rowCount());
        header.row(0).assertCellParams(new TableCellParams[]{
                new TableCellParams("Common Header", 9, 1, "border-bottom: 2px solid gray")
        });
        header.row(1).assertCellParams(new TableCellParams[]{
                new TableCellParams("", 1, 2, "border-right: 2px solid gray; border-bottom: 1px solid #a0a0a0"),
                new TableCellParams("String Field 1", 1, 2, "border-right: 2px solid gray; border-bottom: 1px solid #a0a0a0"),
                new TableCellParams(NBSP_CHAR, 1, 2, "border-right: 2px solid gray; border-bottom: 1px solid #a0a0a0"),
                new TableCellParams("String Fields", 5, 1, "border-right: 1px solid orange; border-bottom: ? none ?"),
                new TableCellParams("Int Field 3 (header only)", 1, 2, "border-right: ? none ?; border-bottom: 1px solid #a0a0a0")
        });
        header.row(2).assertCellParams(new TableCellParams[]{
                new TableCellParams("String Field 3", 1, 1, "border-right: ? none ?; border-bottom: 1px solid #a0a0a0"),
                new TableCellParams("Int Field 1", 1, 1, "border-right: ? none ?; border-bottom: 1px solid #a0a0a0"),
                new TableCellParams("", 1, 1, "border-right: ? none ?; border-bottom: 1px solid #a0a0a0"),
                new TableCellParams(NBSP_CHAR, 1, 1, "border-right: ? none ?; border-bottom: 1px solid #a0a0a0"),
                new TableCellParams(NBSP_CHAR, 1, 1, "border-right: 1px solid orange; border-bottom: 1px solid #a0a0a0"),
        });
        header.row(3).assertCellStyles("border-bottom: 2px solid gray");
        for (int i = 1; i <= 2; i++)
            header.row(i).assertStyle("color: OrangeRed; font-weight: bold; font-family: Tahoma,Arial; font-size: 19px;");

        TableSectionInspector body = table.body();
        assertEquals("Checking the number of body rows", 10, body.rowCount());
        body.assertColumnCellStyles(new String[]{
                "border-right: 2px solid silver",
                "border-right: 2px solid silver",
                "border-right: 2px solid silver",
                "border-right: ? none ?",
                "border-right: ? none ?",
                "border-right: ? none ?",
                "border-right: ? none ?",
                "border-right: 1px solid silver",
                "border-right: ? none ?",
        });

        TableSectionInspector footer = table.footer();
        assertEquals("Checking the number of footer rows", 4, footer.rowCount());
        footer.row(0).assertCellStyles("border-top: 2px solid gray");
        footer.row(0).assertCellParams(new TableCellParams[]{
                new TableCellParams(NBSP_CHAR, 1, 3, "border-right: 2px solid gray"),
                new TableCellParams("String Field 1 (footer)", 1, 3, "border-right: 2px solid gray"),
                new TableCellParams("String Field 2 (footer only)", 1, 3, "border-right: 2px solid gray"),
                new TableCellParams("String Field 3 (footer)", 1, 1, "border-right: ? none ?"),
                new TableCellParams("Int Field 1 (footer)", 1, 1, "border-right: ? none ?"),
                new TableCellParams("", 1, 1, "border-right: ? none ?"),
                new TableCellParams(NBSP_CHAR, 1, 1, "border-right: ? none ?"),
                new TableCellParams(NBSP_CHAR, 1, 1, "border-right: 1px solid DarkBlue"),
                new TableCellParams(NBSP_CHAR, 1, 2, "border-right: ? none ?")
        });
        footer.row(1).assertCellParams(new TableCellParams[]{
                new TableCellParams("String Fields (footer)", 5, 1)
        });
        footer.row(2).assertCellParams(new TableCellParams[]{
                new TableCellParams("3-rd level footer", 6, 1, "border-top: 1px solid DarkBlue")
        });
        footer.row(3).assertCellParams(new TableCellParams[]{
                new TableCellParams("Common Footer", 9, 1, "border-top: 2px solid gray")
        });

        for (int i = 0; i <= 2; i++)
            footer.row(i).assertStyle("color: DarkBlue; font-weight: bold; font-family: Tahoma,Arial; font-size: 19px;");
    }
View Full Code Here

        //check is message string for the no data corresponding to filter criterion visible
        DataTableInspector noDataMessageDataTable = dataTable("formID:noDataMessageAllowedID");
        noDataMessageDataTable.column(0).filter(InputTextFilterInspector.class, "formID:noDataMessageAllowedID:filter1").makeFiltering("www");
        assertEquals("There should be one invisible fake row", 1, noDataMessageDataTable.body().rowCount());
        noDataMessageDataTable.body().row(0).assertCellParams(new TableCellParams[]{
                new TableCellParams(null, 2, 1, "display: none")
        });

        //check custom message for the no data corresponding to filter criterion
        DataTableInspector customNoDataMessageTable = dataTable("formID:customNoDataMessageID");
        customNoDataMessageTable.column(0).filter(InputTextFilterInspector.class,"formID:customNoDataMessageID:filter1").makeFiltering("www");
        element("formID:customNoDataMessageID:noFilteredDataCustomMessageID").assertText("Test no filtered data");

        //check default string for the no data corresponding to filter criterion
        dataTable("formID:emptyDataID").bodyRow(0).cell(0).assertText("No records");

        //check is message string for the no data visible
        assertEquals("There should be one invisible fake row", 1, new TableInspector("formID:emptyDataMessageForbiddenID").body().rowCount());
        dataTable("formID:emptyDataMessageForbiddenID").body().row(0).assertCellParams(new TableCellParams[]{
                new TableCellParams(null, 2, 1, "display: none")
        });

        //check custom message for the no data
        element("formID:customEmptyDataID:noDataMessageID").assertText("Test data is empty");
View Full Code Here

TOP

Related Classes of org.seleniuminspector.html.TableCellParams

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.