Package com.gargoylesoftware.htmlunit.html

Examples of com.gargoylesoftware.htmlunit.html.HtmlButtonInput.click()


    @Test
    public void testButton() throws IOException {
        HtmlButtonInput button = (HtmlButtonInput)page.getElementById("button1");
        assertEquals("Login4", button.asText());
       
        HtmlPage output = button.click();
        assertEquals("HTTP GET (Login)", output.getTitleText());
    }
}
View Full Code Here


        HtmlPage commandResult = null;
        if(commandButton != null){
          //System.out.println("command button text:"+commandButton.asText());
          commandButton.focus();
          //System.out.println("command button script:"+commandButton.getOnClickAttribute());
          commandResult = (HtmlPage)commandButton.click();
        }

        //System.out.println("alerts size:"+collectedAlerts.size());
        //if(collectedAlerts.size() > 0){
          //for(int i=0; i<collectedAlerts.size(); i++){
View Full Code Here

        assertTrue(-1 != allOptionsText.indexOf("UPDATE DEPARTMENT SET NAME='MyUpdDept' WHERE COMPANYID=1 AND ID=1"));//check each option

        //check result
        HtmlButtonInput adhocButton = (HtmlButtonInput)adhocForm.getHtmlElementById("queryButton");
        adhocButton.focus();
        HtmlPage adhocResult = (HtmlPage)adhocButton.click();
        String adhocResultText = adhocResult.asText();
        //System.out.println("initial result:"+adhocResultText);

        //System.out.println("alerts size:"+collectedAlerts.size());
        //if(collectedAlerts.size() > 0){
View Full Code Here

        HtmlPage commandResult = null;
        if(commandButton != null){
          //System.out.println("command button text:"+commandButton.asText());
          commandButton.focus();
          //System.out.println("command button script:"+commandButton.getOnClickAttribute());
          commandResult = (HtmlPage)commandButton.click();
        }


        //System.out.println("alerts size:"+collectedAlerts.size());
        //if(collectedAlerts.size() > 0){
View Full Code Here

        assertTrue(-1 != allOptionsText.indexOf("DELETE FROM DEPARTMENT WHERE DEPARTMENT.COMPANYID=1 and DEPARTMENT.ID>1"));//check each option
        assertTrue(-1 != allOptionsText.indexOf("UPDATE DEPARTMENT SET NAME='MyUpdDept' WHERE COMPANYID=1 AND ID=1"));//check each option

        //check result
        HtmlButtonInput adhocButton = (HtmlButtonInput)adhocForm.getHtmlElementById("queryButton");
        HtmlPage adhocResult = (HtmlPage)adhocButton.click();

        //System.out.println("alerts size:"+collectedAlerts.size());
        //if(collectedAlerts.size() > 0){
          //for(int i=0; i<collectedAlerts.size(); i++){
            //System.out.println("alert msg:"+collectedAlerts.get(i));
View Full Code Here

        HtmlPage commandResult = null;
        if(commandButton != null){
          //System.out.println("command button text:"+commandButton.asText());
          commandButton.focus();
          //System.out.println("command button script:"+commandButton.getOnClickAttribute());
          commandResult = (HtmlPage)commandButton.click();
        }


        //System.out.println("alerts size:"+collectedAlerts.size());
        //if(collectedAlerts.size() > 0){
View Full Code Here

        HtmlPage commandResult = null;
        if(commandButton != null){
          //System.out.println("command button text:"+commandButton.asText());
          commandButton.focus();
          //System.out.println("command button script:"+commandButton.getOnClickAttribute());
          commandResult = (HtmlPage)commandButton.click();
        }

        //System.out.println("alerts size:"+collectedAlerts.size());
        //if(collectedAlerts.size() > 0){
          //for(int i=0; i<collectedAlerts.size(); i++){
View Full Code Here

        HtmlPage commandResult = null;
        if(commandButton != null){
          //System.out.println("command button text:"+commandButton.asText());
          commandButton.focus();
          //System.out.println("command button script:"+commandButton.getOnClickAttribute());
          commandResult = (HtmlPage)commandButton.click();
        }

        //System.out.println("alerts size:"+collectedAlerts.size());
        //if(collectedAlerts.size() > 0){
          //for(int i=0; i<collectedAlerts.size(); i++){
View Full Code Here

        HtmlPage commandResult = null;
        if(commandButton != null){
          //System.out.println("command button text:"+commandButton.asText());
          commandButton.focus();
          //System.out.println("command button script:"+commandButton.getOnClickAttribute());
          commandResult = (HtmlPage)commandButton.click();
        }

        //System.out.println("alerts size:"+collectedAlerts.size());
        //if(collectedAlerts.size() > 0){
          //for(int i=0; i<collectedAlerts.size(); i++){
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.