Changeset 1228
- Timestamp:
- 06/26/13 15:31:31 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlMonitorServlet.java
r1206 r1228 506 506 507 507 if ("onscroll".equals(eventType)) { 508 if ((coordinates == null) && (key == null) && 509 (scrollPosition != null) && (selectedValue == null)) 510 { 511 result = true; 508 result = 509 (coordinates == null) && (key == null) && 510 (scrollPosition != null) && (selectedValue == null); 511 } 512 else if ("onclick".equals(eventType) || "ondblclick".equals(eventType)) { 513 result = 514 (coordinates != null) && (key == null) && 515 (scrollPosition == null) && (selectedValue == null); 516 } 517 else if ("onchange".equals(eventType)) { 518 // "input_password" don't have a selectedValue 519 if (domPath.contains("input_password")) { 520 result = 521 (coordinates == null) && (key == null) && 522 (scrollPosition == null) && (selectedValue == null); 512 523 } 513 524 else { 514 Console.printerrln(eventType + " event has invalid parameters"); 515 } 516 } 517 else if ("onclick".equals(eventType) || "ondblclick".equals(eventType)) { 518 if ((coordinates != null) && (key == null) && 519 (scrollPosition == null) && (selectedValue == null)) 520 { 521 result = true; 522 } 523 else { 524 Console.printerrln(eventType + " event has invalid parameters"); 525 } 526 } 527 else if ("onchange".equals(eventType)) { 528 // "input_password" dont have a selectedValue 529 if (domPath.contains("input_password")) { 530 if ((coordinates == null) && (key == null) && (scrollPosition == null)) { 531 result = true; 532 } 533 else { 534 Console.printerrln(eventType + " event has invalid parameters"); 535 } 536 } 537 else { 538 if ((coordinates == null) && (key == null) && (scrollPosition == null) && 539 (selectedValue != null)) 540 { 541 result = true; 542 } 543 else { 544 Console.printerrln(eventType + " event has invalid parameters"); 545 } 525 result = 526 (coordinates == null) && (key == null) && 527 (scrollPosition == null) && (selectedValue != null); 546 528 } 547 529 … … 550 532 "onkeyup".equals(eventType)) 551 533 { 552 if ((coordinates == null) && (key != null) && 553 (scrollPosition == null) && (selectedValue == null)) 554 { 555 result = true; 556 } 557 else { 558 Console.printerrln(eventType + " event has invalid parameters"); 559 } 534 result = 535 (coordinates == null) && (key != null) && 536 (scrollPosition == null) && (selectedValue == null); 560 537 } 561 538 else if ("onfocus".equals(eventType) || "onmouseout".equals(eventType) || … … 569 546 "onselect".equals(eventType)) 570 547 { 571 if ((coordinates == null) && (key == null) && 572 (scrollPosition == null) && (selectedValue == null)) 573 { 574 result = true; 575 } 576 else { 577 Console.printerrln(eventType + " event has invalid parameters"); 578 } 548 result = 549 (coordinates == null) && (key == null) && 550 (scrollPosition == null) && (selectedValue == null); 579 551 } 580 552 else { 581 553 Console.printerrln("'" + eventType + "' is not a valid event type"); 554 } 555 556 if (!result) { 557 Console.printerrln(eventType + " event has invalid parameters"); 558 Console.printerrln("coordinates: " + coordinates); 559 Console.printerrln("key: " + key); 560 Console.printerrln("scrollPosition: " + scrollPosition); 561 Console.printerrln("selectedValue: " + selectedValue); 582 562 } 583 563
Note: See TracChangeset
for help on using the changeset viewer.