Author: vrockai
Date: 2009-04-02 09:03:59 -0400 (Thu, 02 Apr 2009)
New Revision: 13113
Modified:
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java
Log:
[selenium] - debug into end2end bea portlet creation
Modified:
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java 2009-04-02
10:26:05 UTC (rev 13112)
+++
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java 2009-04-02
13:03:59 UTC (rev 13113)
@@ -12,7 +12,7 @@
*/
@Test(groups = {"end2end"}, enabled = true, description = "Creating of new
portal with content.")
public class EndToEndBeaPortlet extends JBossPortalSeleniumTestCase {
- public static long AJAX_TIMEOUT = 15000;
+
public static String casePfx = "e2e.wsrp.";
private final String SUB_VIEW_PORTLETS =
"//input[contains(@id,'definition-form:view-portlets')]";
@@ -102,6 +102,8 @@
public static String WSRP_CONSUMER_TABLE =
"//table[contains(@id,':consumer-list-form:consumersList')]";
+ public static int c = 0;
+
@BeforeMethod(groups = { "log" })
public void loginBeforeTest() {
logoutIfPossible();
@@ -123,14 +125,14 @@
String pageName = "default";
String defName= "BEA: Hello World";
String insName = "1BeaPor";
-
+ debugScreenshot("debug_e2e_bea_"+ c++ +".jpg");
createConsumer(consName);
createInstance(defName, consName, insName);
addPortlet(portalName, pageName, insName, "portlet");
-
+ debugScreenshot("debug_e2e_bea_"+ c++ +".jpg");
selenium.open(ADR_HOME);
selenium.waitForPageToLoad(PAGE_LOAD);
- waitFor(AJAX_TIMEOUT);
+ debugScreenshot("debug_e2e_bea_"+ c++ +".jpg");
Assert.assertTrue(selenium.isTextPresent("1BeaPorWindow"));
Assert.assertTrue(selenium.isTextPresent("Welcome to WebLogic Portal WSRP
Demo."));
@@ -154,15 +156,18 @@
selenium.type(INPUT_CONSWSDL,
"http://wsrp.bea.com:7001/producer/producer?WSDL");
selenium.click(SUBMIT_REFRESHSAVE);
selenium.waitForPageToLoad(PAGE_LOAD);
+ debugScreenshot("debug_e2e_bea_"+ c++ +".jpg");
Assert.assertTrue(selenium.isTextPresent("Refresh failed (probably because the
registration information was not valid)."));
Assert.assertTrue(selenium.isTextPresent("Missing value"));
selenium.type(INPUT_CONS_REGVALUE, "public");
selenium.click(SUBMIT_CONS_REGVAL);
selenium.waitForPageToLoad(PAGE_LOAD);
+ debugScreenshot("debug_e2e_bea_"+ c++ +".jpg");
Assert.assertTrue(selenium.isTextPresent("Refresh was successful."));
selenium.click(SUBMIT_REFRESHFINAL);
selenium.waitForPageToLoad(PAGE_LOAD);
+ debugScreenshot("debug_e2e_bea_"+ c++ +".jpg");
Assert.assertTrue(selenium.isTextPresent(consumerName));
}
@@ -178,12 +183,12 @@
selenium.select(SEL_CONS_TYPE, "label="+type);
selenium.click(SUB_VIEW_PORTLETS);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+ debugScreenshot("debug_e2e_bea_"+ c++ +".jpg");
int r = findTableRow(TABLE_PORTLET, defName, 0);
selenium.click(MessageFormat.format(T_LINK_CREATE,r-1));
selenium.waitForPageToLoad(PAGE_LOAD);
- //selenium.setSpeed("5555");
+ debugScreenshot("debug_e2e_bea_"+ c++ +".jpg");
selenium.type(INPUT_INSTANCE_NAME, insName);
selenium.click(SUBMIT_CREATE_INST);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -196,7 +201,7 @@
selenium.click("link=Admin");
selenium.waitForPageToLoad(PAGE_LOAD);
-
+ debugScreenshot("debug_e2e_bea_"+ c++ +".jpg");
clickIfVisible(TAB_PORTALOBJ_ID);
clickIfVisible(LNK_PORTALS_ID);
clickIfVisible(LNK_PORTAL_HOME);
@@ -204,7 +209,7 @@
int r = findTableRow(TBL_PORTAL_ADMIN, portalName, 0) - 1;
selenium.click(MessageFormat.format(POR_TL_MAIN, r));
selenium.waitForPageToLoad(PAGE_LOAD);
-
+ debugScreenshot("debug_e2e_bea_"+ c++ +".jpg");
r = findTableRow(TBL_PORTALPAGE_ADMIN, pageName, 0) - 1;
// click on the page layout
@@ -215,7 +220,7 @@
} catch (InterruptedException e) {
e.printStackTrace();
}
-
+ debugScreenshot("debug_e2e_bea_"+ c++ +".jpg");
//hack
selenium.select(SEL_PORTLET_TYPE, "label=" + "cms");
try {
@@ -223,17 +228,17 @@
} catch (InterruptedException e) {
e.printStackTrace();
}
-
+ debugScreenshot("debug_e2e_bea_"+ c++ +".jpg");
selenium.select(SEL_PORTLET_TYPE, "label=" + type);
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
e.printStackTrace();
}
-
+ debugScreenshot("debug_e2e_bea_"+ c++ +".jpg");
selenium.click("link=*"+portletName+"*");
selenium.waitForPageToLoad(PAGE_LOAD);
-
+ debugScreenshot("debug_e2e_bea_"+ c++ +".jpg");
selenium.click(SUB_LAYOUT_ADD_CENTER);
selenium.waitForPageToLoad(PAGE_LOAD);
Show replies by date