Changeset 1174


Ignore:
Timestamp:
04/24/13 11:45:41 (11 years ago)
Author:
ftrautsch
Message:

Modified Method "checkEventParameterCombinations" - onchange Event because of the input_password bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlMonitorServlet.java

    r1075 r1174  
    314314                    } 
    315315                    else if (checkEventParameterCombinations 
    316                                 (eventType, coordinates, key, scrollPosition, selectedValue)) 
     316                                (eventType, coordinates, key, scrollPosition, selectedValue, domPath)) 
    317317                    { 
    318318                        HtmlPageElement target = 
     
    481481     * @param scrollPosition the scroll position of the event 
    482482     * @param selectedValue  the value selected through a specific event 
     483     * @param domPath            the path through the DOM of the document of the HTML element on which 
     484     *                       the event was executed 
    483485     *  
    484486     * @return true, if the combination of the parameters is valid, false else 
     
    488490                                                    Integer   key, 
    489491                                                    Integer[] scrollPosition, 
    490                                                     String    selectedValue) 
     492                                                    String    selectedValue, 
     493                                                    String    domPath) 
    491494    { 
    492495        boolean result = false; 
     
    513516        } 
    514517        else if ("onchange".equals(eventType)) { 
    515             if ((coordinates == null) && (key == null) && 
    516                 (scrollPosition == null) && (selectedValue != null)) 
    517             { 
    518                 result = true; 
     518            // "input_password" dont have a selectedValue 
     519            if (domPath.contains("input_password")) { 
     520                if ((coordinates == null) && (key == null) && (scrollPosition == null)) { 
     521                    result = true; 
     522                } 
     523                else { 
     524                    Console.printerrln(eventType + " event has invalid parameters"); 
     525                } 
    519526            } 
    520527            else { 
    521                 Console.printerrln(eventType + " event has invalid parameters"); 
    522             } 
     528                if ((coordinates == null) && (key == null) && (scrollPosition == null) && 
     529                    (selectedValue != null)) 
     530                { 
     531                    result = true; 
     532                } 
     533                else { 
     534                    Console.printerrln(eventType + " event has invalid parameters"); 
     535                } 
     536            } 
     537 
    523538        } 
    524539        else if ("onkeypress".equals(eventType) || "onkeydown".equals(eventType) || 
Note: See TracChangeset for help on using the changeset viewer.