Author: mvanco(a)redhat.com
Date: 2010-04-16 03:11:14 -0400 (Fri, 16 Apr 2010)
New Revision: 2672
Modified:
portal/trunk/testsuite/selenium-snifftests/src/main/java/org/exoplatform/portal/selenium/SeleniumTestCaseGenerator.java
Log:
UI Tests: fixed generator - wrong representation of waitForTextNotPresent
Modified:
portal/trunk/testsuite/selenium-snifftests/src/main/java/org/exoplatform/portal/selenium/SeleniumTestCaseGenerator.java
===================================================================
---
portal/trunk/testsuite/selenium-snifftests/src/main/java/org/exoplatform/portal/selenium/SeleniumTestCaseGenerator.java 2010-04-16
06:51:03 UTC (rev 2671)
+++
portal/trunk/testsuite/selenium-snifftests/src/main/java/org/exoplatform/portal/selenium/SeleniumTestCaseGenerator.java 2010-04-16
07:11:14 UTC (rev 2672)
@@ -267,7 +267,7 @@
sb.append("TestCase.assertEquals(\"");
sb.append(param2);
sb.append("\", selenium.getTitle());\n");
- } else if (param1.equals("waitForElementNotPresent") ||
param1.equals("waitForTextNotPresent")) {
+ } else if (param1.equals("waitForElementNotPresent")) {
sb.append("for (int second = 0;; second++) {\n");
sb.append(getTimeoutMessage(param1));
sb.append("try {\nif (!selenium.isElementPresent(\"");
@@ -290,7 +290,15 @@
sb.append(param2);
sb.append("\")) \nbreak; }\n catch (Exception e) {}\n");
sb.append("Thread.sleep(1000);\n");
- sb.append("}\n");
+ sb.append("}\n");
+ } else if (param1.equals("waitForTextNotPresent")) {
+ sb.append("for (int second = 0;; second++) {\n");
+ sb.append(getTimeoutMessage(param1));
+ sb.append("try {\n if (!selenium.isTextPresent(\"");
+ sb.append(param2);
+ sb.append("\")) \nbreak; }\n catch (Exception e) {}\n");
+ sb.append("Thread.sleep(1000);\n");
+ sb.append("}\n");
} else if (param1.equals("waitForTable")) {
sb.append("for (int second = 0;; second++) {\n");
sb.append(getTimeoutMessage(param1));
Show replies by date