maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r483794 - /maven/shared/trunk/maven-web-ui-tests/src/main/java/org/apache/maven/shared/web/test/AbstractSeleniumTestCase.java
Date Fri, 08 Dec 2006 03:00:37 GMT
Author: evenisse
Date: Thu Dec  7 19:00:36 2006
New Revision: 483794

URL: http://svn.apache.org/viewvc?view=rev&rev=483794
Log:
o Fix security part in breadcrumbs
o Add isElementPresent method

Modified:
    maven/shared/trunk/maven-web-ui-tests/src/main/java/org/apache/maven/shared/web/test/AbstractSeleniumTestCase.java

Modified: maven/shared/trunk/maven-web-ui-tests/src/main/java/org/apache/maven/shared/web/test/AbstractSeleniumTestCase.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-web-ui-tests/src/main/java/org/apache/maven/shared/web/test/AbstractSeleniumTestCase.java?view=diff&rev=483794&r1=483793&r2=483794
==============================================================================
--- maven/shared/trunk/maven-web-ui-tests/src/main/java/org/apache/maven/shared/web/test/AbstractSeleniumTestCase.java
(original)
+++ maven/shared/trunk/maven-web-ui-tests/src/main/java/org/apache/maven/shared/web/test/AbstractSeleniumTestCase.java
Thu Dec  7 19:00:36 2006
@@ -100,22 +100,22 @@
 
     public void assertElementPresent( String elementLocator )
     {
-        assertTrue( "'" + elementLocator + "' isn't present.", sel.isElementPresent( elementLocator
) );
+        assertTrue( "'" + elementLocator + "' isn't present.", isElementPresent( elementLocator
) );
     }
 
     public void assertElementNotPresent( String elementLocator )
     {
-        assertFalse( "'" + elementLocator + "' is present.", sel.isElementPresent( elementLocator
) );
+        assertFalse( "'" + elementLocator + "' is present.", isElementPresent( elementLocator
) );
     }
 
     public void assertLinkPresent( String text )
     {
-        assertTrue( "The link '" + text + "' isn't present.", sel.isElementPresent( "link="
+ text ) );
+        assertTrue( "The link '" + text + "' isn't present.", isElementPresent( "link=" +
text ) );
     }
 
     public void assertLinkNotPresent( String text )
     {
-        assertFalse( "The link '" + text + "' is present.", sel.isElementPresent( "link="
+ text ) );
+        assertFalse( "The link '" + text + "' is present.", isElementPresent( "link=" + text
) );
     }
 
     public void assertImgWithAlt( String alt )
@@ -144,7 +144,12 @@
 
     public boolean isLinkPresent( String text )
     {
-        return sel.isElementPresent( "link=" + text );
+        return isElementPresent( "link=" + text );
+    }
+
+    public boolean isElementPresent( String locator )
+    {
+        return sel.isElementPresent( locator );
     }
 
     public void waitPage()
@@ -202,7 +207,7 @@
 
     public void clickButtonWithValue( String text, boolean wait )
     {
-        if ( sel.isElementPresent( "//button[@value='" + text + "']" ) )
+        if ( isElementPresent( "//button[@value='" + text + "']" ) )
         {
             clickLinkWithXPath( "//button[@value='" + text + "']", wait );
         }
@@ -349,8 +354,9 @@
 
         if ( validUsernamePassword )
         {
-            assertTextPresent( "Welcome, " );
-            assertLinkPresent( username );
+            assertTextPresent( "Current User:" );
+            assertTextPresent( username );
+            assertLinkPresent( "Edit Details" );
             assertLinkPresent( "Logout" );
         }
         else



Mime
View raw message