Package com.gargoylesoftware.htmlunit.html

Examples of com.gargoylesoftware.htmlunit.html.HtmlSelect.asText()


        final HtmlPage page = webClient.getPage("http://localhost:8080/photark/admin/upload.html");
        Thread.sleep(3000);

        //testing the loaded page
        HtmlSelect select = page.getHtmlElementById("selectAlbum");
        assertTrue(select.asText().contains("New Album"));
        assertTrue(page.<HtmlElement>getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display: none;"));
        assertTrue(page.<HtmlElement>getHtmlElementById("deleteAlbum").getAttribute("style").contains("display: none;"));
        assertTrue(page.<HtmlElement>getHtmlElementById("btnAlbumDesc").getAttribute("style").contains("display: none;"));

        assertFalse(page.<HtmlElement>getHtmlElementById("albumCover").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
View Full Code Here


        //selecting an album from drop down
        HtmlOption option = select.getOption(1);
        option.click();
        Thread.sleep(3000);
        //testing whether the expected changes has happened
        assertTrue(select.asText().contains("boston"));
        assertTrue(page.<HtmlElement>getHtmlElementById("albumCover").asXml().contains("photark/gallery/boston/dsc"));

        assertTrue(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
        assertTrue(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00368.jpg"));
View Full Code Here

        final HtmlPage page = webClient.getPage("http://localhost:8080/photark/admin/upload.html");
        Thread.sleep(3000);

        //testing the loaded page
        HtmlSelect select = page.getHtmlElementById("selectAlbum");
        assertTrue(select.asText().contains("New Album"));
        assertTrue(page.<HtmlElement>getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display: none;"));
        assertTrue(page.<HtmlElement>getHtmlElementById("deleteAlbum").getAttribute("style").contains("display: none;"));
        assertTrue(page.<HtmlElement>getHtmlElementById("btnAlbumDesc").getAttribute("style").contains("display: none;"));

        assertFalse(page.<HtmlElement>getHtmlElementById("albumCover").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
View Full Code Here

        //selecting an album from drop down
        HtmlOption option = select.getOption(1);
        option.click();
        Thread.sleep(3000);
        //testing whether the expected changes has happened
        assertTrue(select.asText().contains("boston"));
        assertTrue(page.<HtmlElement>getHtmlElementById("albumCover").asXml().contains("photark/gallery/boston/dsc"));

        assertTrue(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
        assertTrue(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00368.jpg"));
View Full Code Here

        final HtmlPage page = webClient.getPage("http://localhost:8080/photark/admin/upload.html");
        Thread.sleep(3000);

        //testing the loaded page
        HtmlSelect select = page.getHtmlElementById("selectAlbum");
        assertTrue(select.asText().contains("New Album"));
        assertTrue(page.<HtmlElement>getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display: none;"));
        assertTrue(page.<HtmlElement>getHtmlElementById("deleteAlbum").getAttribute("style").contains("display: none;"));
        assertTrue(page.<HtmlElement>getHtmlElementById("btnAlbumDesc").getAttribute("style").contains("display: none;"));

        assertFalse(page.<HtmlElement>getHtmlElementById("albumCover").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
View Full Code Here

        //selecting an album from drop down
        HtmlOption option = select.getOption(1);
        option.click();
        Thread.sleep(3000);
        //testing whether the expected changes has happened
        assertTrue(select.asText().contains("boston"));
        assertTrue(page.<HtmlElement>getHtmlElementById("albumCover").asXml().contains("photark/gallery/boston/dsc"));

        assertTrue(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
        assertTrue(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00368.jpg"));
View Full Code Here

    final HtmlPage page = webClient.getPage("http://localhost:8080/photark/admin/upload.html");
    Thread.sleep(3000);
   
    //testing the loaded page
    HtmlSelect select = page.getHtmlElementById("selectAlbum");
    assertTrue(select.asText().contains("New Album"));
    assertTrue(page.<HtmlElement>getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display: none;"));
    assertTrue(page.<HtmlElement>getHtmlElementById("deleteAlbum").getAttribute("style").contains("display: none;"));
    assertTrue(page.<HtmlElement>getHtmlElementById("btnAlbumDesc").getAttribute("style").contains("display: none;"));

    assertFalse(page.<HtmlElement>getHtmlElementById("albumCover").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
View Full Code Here

    //selecting an album from drop down
    HtmlOption option = select.getOption(1);
    option.click();
    Thread.sleep(3000);
    //testing whether the expected changes has happened
    assertTrue(select.asText().contains("boston"));
    assertTrue(page.<HtmlElement>getHtmlElementById("albumCover").asXml().contains("photark/gallery/boston/dsc"));
   
    assertTrue(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
    assertTrue(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00368.jpg"));
   
View Full Code Here

    final HtmlPage page = webClient.getPage("http://localhost:8080/photark/admin/upload.html");
    Thread.sleep(3000);
   
    //testing the loaded page
    HtmlSelect select = page.getHtmlElementById("selectAlbum");
    assertTrue(select.asText().contains("New Album"));
    assertTrue(page.<HtmlElement>getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display: none;"));
    assertTrue(page.<HtmlElement>getHtmlElementById("deleteAlbum").getAttribute("style").contains("display: none;"));
    assertTrue(page.<HtmlElement>getHtmlElementById("btnAlbumDesc").getAttribute("style").contains("display: none;"));

    assertFalse(page.<HtmlElement>getHtmlElementById("albumCover").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
View Full Code Here

    //selecting an album from drop down
    HtmlOption option = select.getOption(1);
    option.click();
    Thread.sleep(3000);
    //testing whether the expected changes has happened
    assertTrue(select.asText().contains("boston"));
    assertTrue(page.<HtmlElement>getHtmlElementById("albumCover").asXml().contains("photark/gallery/boston/dsc"));
   
    assertTrue(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
    assertTrue(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00368.jpg"));
   
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.