Author: hangnguyen
Date: 2010-08-02 05:34:29 -0400 (Mon, 02 Aug 2010)
New Revision: 3734
Modified:
portal/trunk/testsuite/selenium-snifftests/src/main/java/org/exoplatform/portal/selenium/SeleniumTestCaseGenerator.java
Log:
Add new command "waitForConfirmationPresent"
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-08-02
09:28:30 UTC (rev 3733)
+++
portal/trunk/testsuite/selenium-snifftests/src/main/java/org/exoplatform/portal/selenium/SeleniumTestCaseGenerator.java 2010-08-02
09:34:29 UTC (rev 3734)
@@ -345,6 +345,14 @@
sb.append("\")) {\nbreak;\n}\n}\ncatch (Exception e) {\n}\n");
sb.append("Thread.sleep(1000);\n");
sb.append("}\n");
+ }else if (param1.equals("waitForConfirmationPresent")) {
+ sb.append("for (int second = 0;; second++) {\n");
+ sb.append(getTimeoutMessage(param1));
+ sb.append("try {\n");
+ sb.append("if (selenium.isConfirmationPresent()");
+ sb.append("){\nbreak;\n}\n}\ncatch (Exception e) {\n}\n");
+ sb.append("Thread.sleep(1000);\n");
+ sb.append("}\n");
} else if (param1.equals("verifyEval")) {
sb.append("TestCase.assertEquals(\"");
sb.append(param3);
Show replies by date